Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Revert changing payload info to meta property (#142)
Browse files Browse the repository at this point in the history
Closes #141
  • Loading branch information
alexlafroscia authored Aug 11, 2016
1 parent d3178a5 commit b4bf0f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addon/mixins/ajax-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ export default Mixin.create({
return {
status: `${status}`,
title: error.title || 'The backend responded with an error',
meta: error
detail: error
};
} else {
return {
Expand All @@ -852,7 +852,7 @@ export default Mixin.create({
{
status: `${status}`,
title: payload.title || 'The backend responded with an error',
meta: payload
detail: payload
}
];
}
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/mixins/ajax-request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ describe('Unit | Mixin | ajax request', function() {
{ status: 400, title: 'Bar' }
]);
expect(payloadArrayOfObjects).to.deep.equal([
{ status: '400', title: 'Foo', meta: { status: 400, title: 'Foo' } },
{ status: '400', title: 'Bar', meta: { status: 400, title: 'Bar' } }
{ status: '400', title: 'Foo', detail: { status: 400, title: 'Foo' } },
{ status: '400', title: 'Bar', detail: { status: 400, title: 'Bar' } }
]);

const payloadArrayOfStrings = service.normalizeErrorResponse(400, {}, [
Expand All @@ -722,7 +722,7 @@ describe('Unit | Mixin | ajax request', function() {
{
status: '400',
title: 'Foo',
meta: {
detail: {
title: 'Foo'
}
}
Expand Down

0 comments on commit b4bf0f2

Please sign in to comment.