@tryghost/errors 1.2.7 → 1.2.10

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.
package/lib/errors.js CHANGED
@@ -170,6 +170,15 @@ const ghostErrors = {
170
170
  }, options));
171
171
  }
172
172
  },
173
+ RequestNotAcceptableError: class RequestNotAcceptableError extends GhostError {
174
+ constructor(options) {
175
+ super(merge({
176
+ statusCode: 406,
177
+ errorType: 'RequestNotAcceptableError',
178
+ message: 'Request not acceptable for provided Accept-Version header.'
179
+ }, options));
180
+ }
181
+ },
173
182
  RequestEntityTooLargeError: class RequestEntityTooLargeError extends GhostError {
174
183
  constructor(options) {
175
184
  super(merge({
package/lib/utils.js CHANGED
@@ -188,7 +188,7 @@ exports.prepareStackForUser = function prepareStackForUser(error) {
188
188
 
189
189
  // We build this up backwards, so we always insert at position 1
190
190
 
191
- if (process.env.NODE_ENV === 'production') {
191
+ if (process.env.NODE_ENV === 'production' || error.hideStack) {
192
192
  stackbits.splice(1, stackbits.length - 1);
193
193
  } else {
194
194
  // Clearly mark the strack trace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/errors",
3
- "version": "1.2.7",
3
+ "version": "1.2.10",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/errors",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -29,5 +29,5 @@
29
29
  "utils-copy-error": "^1.0.1",
30
30
  "uuid": "^8.3.2"
31
31
  },
32
- "gitHead": "782447b7c96a800387ef83ad4a2a330615918399"
32
+ "gitHead": "4a105c2e93c720df158f10c6036f86e5575ca440"
33
33
  }