We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Hey,
I'm using ApiProblem.create() to create custom API problems. I then (among other things) send them to @getsentry for further internal error reporting.
ApiProblem.create()
To not have all errors that are the result of an ApiProblem to be grouped under "HTTP-Problem", I tried to set the .name property, however I get
.name
TypeError: Cannot assign to read only property 'name' of function
mostly because of this line:
node-api-problem/lib/apiProblem.js
Line 44 in 4071cfd
Could name be a parameter, so that users of this lib have some influence over
name
HTTP-Problem: [400] my error description > https://problems.example.com/myerror12'
to say
MyCustomError: [400] my error description > https://problems.example.com/myerror12'
when stringifying ?
Or is there another way (apart from the documented new (ApiProblem.create())) to subclass ApiProblem ?
new (ApiProblem.create())
ApiProblem
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey,
I'm using
ApiProblem.create()
to create custom API problems. I then (among other things) send them to @getsentry for further internal error reporting.To not have all errors that are the result of an ApiProblem to be grouped under "HTTP-Problem", I tried to set the
.name
property, however I getmostly because of this line:
node-api-problem/lib/apiProblem.js
Line 44 in 4071cfd
Is there a specific reason for that lock-down on writable properties ?
Could
name
be a parameter, so that users of this lib have some influence overto say
when stringifying ?
Or is there another way (apart from the documented
new (ApiProblem.create())
) to subclassApiProblem
?The text was updated successfully, but these errors were encountered: