Changed error return type back to 'application/json'