Skip to content

Commit

Permalink
[BUG] - Fixing the new response transformer not working for error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Intellipharm committed Mar 25, 2015
1 parent 9f35006 commit 06aaec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http/http-response-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@
* @param config
*/
this.handleErrorResponse = function(resolve, reject, model, response, status, headers, config) {
var angularCakePHPApiErrorResponseTransformer = $injector.get('AngularCakePHPApiIndexResponseTransformer');
var angularCakePHPApiErrorResponseTransformer = $injector.get('AngularCakePHPApiErrorResponseTransformer');

if (_.isFunction(angularCakePHPApiErrorResponseTransformer)) {
angularCakePHPApiIndexResponseTransformer(resolve, reject, model, response, status, headers, config);
angularCakePHPApiErrorResponseTransformer(resolve, reject, model, response, status, headers, config);
} else {
reject({data: response.data, message: response.message});
}
Expand Down

0 comments on commit 06aaec6

Please sign in to comment.