Skip to content

Commit

Permalink
fix(errorHandler): Include requestId for all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaledgarbaya committed Sep 2, 2016
1 parent 0c0155b commit 8a76280
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export default function errorHandler (errorResponse) {
status: status,
statusText: statusText
}
if (get(data, 'sys.type') === 'Error') {
errorData.message = data.message
if(data.requestId){
errorData.requestId = data.requestId
}
if (get(data, 'sys.type') === 'Error') {
errorData.message = data.message
if (data.details) {
errorData.details = data.details
}
Expand Down

0 comments on commit 8a76280

Please sign in to comment.