Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M2ApiResponseError -- captureStackTrace is not a function #287

Closed
pcvonz opened this issue Sep 18, 2018 · 1 comment
Closed

M2ApiResponseError -- captureStackTrace is not a function #287

pcvonz opened this issue Sep 18, 2018 · 1 comment

Comments

@pcvonz
Copy link
Contributor

pcvonz commented Sep 18, 2018

This issue is for the following packages:

[ ] venia-concept
[ ] pwa-buildpack
[x] peregrine
[ ] pwa-module
[ ] pwa-devdocs

This issue is a:

[x] Bug
[ ] Feature suggestion
[ ] Documentation issue
[ ] Other (Please Specify)

Environment

Question Answer
Magento version
Operating System + version
node.js version (node -v)
npm version (npm -v)

Description

Error.captureStackTrace is not a method on the Error object in Firefox.

Expected result:

As a user of Firefox I want an an error returned from a failed request.

Possible solutions:

This is straight from the MDN:

// Maintains proper stack trace for where our error was thrown (only available on V8)
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
if (Error.captureStackTrace) {
  Error.captureStackTrace(this, CustomError);
}
@zetlen
Copy link
Contributor

zetlen commented Sep 27, 2018

Close by #288.

@zetlen zetlen closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants