@tryghost/errors 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/lib/utils.js +2 -1
  2. package/package.json +2 -2
package/lib/utils.js CHANGED
@@ -182,6 +182,7 @@ exports.deserialize = function deserialize(errorFormat) {
182
182
  */
183
183
  exports.isGhostError = function isGhostError(err) {
184
184
  const errorName = this.GhostError.name;
185
+ const legacyErrorName = 'IgnitionError';
185
186
 
186
187
  const recursiveIsGhostError = function recursiveIsGhostError(obj) {
187
188
  // no super constructor available anymore
@@ -189,7 +190,7 @@ exports.isGhostError = function isGhostError(err) {
189
190
  return false;
190
191
  }
191
192
 
192
- if (obj.name === errorName) {
193
+ if (obj.name === errorName || obj.name === legacyErrorName) {
193
194
  return true;
194
195
  }
195
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/errors",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "repository": "https://github.com/TryGhost/Utils/tree/main/packages/errors",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -28,5 +28,5 @@
28
28
  "lodash": "^4.17.21",
29
29
  "uuid": "^8.3.2"
30
30
  },
31
- "gitHead": "d4cd268b6c74e681b17497db0a50af9d87d1d4e3"
31
+ "gitHead": "646fbc5aac374659c3a469ecf99dc5defb1901cf"
32
32
  }