@app-masters/js-lib
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -10,3 +10,3 @@ # Changelog | ||
## [1.2.0/1.2.2] - 2019-01-03 | ||
## [1.2.0/1.2.3] - 2019-01-03 | ||
### Added | ||
@@ -17,2 +17,3 @@ - LaravelErrorHandler for deal with the new error standards | ||
- Accepting larger range of status | ||
- Removing string message from error | ||
@@ -19,0 +20,0 @@ ## [1.1.55] - 2018-11-07 |
@@ -47,3 +47,11 @@ "use strict"; | ||
// Payload error | ||
errorObj.body = JSON.parse(errorObj.remote); | ||
var body = JSON.parse(errorObj.remote); | ||
if (body.error) { | ||
body.error = body.error.map(function (error) { | ||
return error.replace(/ *\[[^)]*\] */g, ''); | ||
}); | ||
} | ||
errorObj.body = body; | ||
errorObj.level = 'error'; | ||
@@ -50,0 +58,0 @@ } else { |
{ | ||
"name": "@app-masters/js-lib", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "JS lib", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -21,3 +21,7 @@ import Rollbar from './rollbar'; | ||
// Payload error | ||
errorObj.body = JSON.parse(errorObj.remote); | ||
const body = JSON.parse(errorObj.remote); | ||
if (body.error) { | ||
body.error = body.error.map(error => error.replace(/ *\[[^)]*\] */g, '')); | ||
} | ||
errorObj.body = body; | ||
errorObj.level = 'error'; | ||
@@ -24,0 +28,0 @@ } else { |
Sorry, the diff of this file is not supported yet
226836
5241