Skip to content

Commit ff09597

Browse files
committed
Same error body using CircularJSON
1 parent 388089f commit ff09597

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

package-lock.json

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
]
5454
},
5555
"dependencies": {
56-
"babel-polyfill": "6.26.0"
56+
"babel-polyfill": "6.26.0",
57+
"circular-json": "0.5.1"
5758
}
5859
}

src/plugins/error-response.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import CircularJSON from 'circular-json'
12
import AbstractLambdaPlugin from './abstract-lambda-plugin'
23
import PluginHook from '../enums/hooks'
34
import LambdaType from '../enums/lambda-type'
@@ -53,7 +54,7 @@ export default class ErrorResponse extends AbstractLambdaPlugin {
5354
}
5455
}
5556

56-
res.body = JSON.stringify(errorBody)
57+
res.body = CircularJSON.stringify(errorBody)
5758
done()
5859
}
5960
}

0 commit comments

Comments
 (0)