@sumaris-net/ngx-components 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14511,7 +14511,10 @@
14511
14511
  var message = err && err.message || err;
14512
14512
  if (typeof message === 'string' && message.trim().indexOf('{"code":') === 0) {
14513
14513
  try {
14514
- error = JSON.parse(err.message);
14514
+ error = JSON.parse(message
14515
+ // Remove special characters before parsing (e.g. SQL errors from an Oracle database)
14516
+ .replace('\n', ' ')
14517
+ .replace('\r', ''));
14515
14518
  }
14516
14519
  catch (parseError) {
14517
14520
  console.error('Unable to parse error as JSON: ', parseError);