-
Notifications
You must be signed in to change notification settings - Fork 17
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
the request won't break even on throwing error #43
Comments
for the example you've provided, as you can see in the image below, throw doesn't show any message in the console if i have only this it works just fine
and as I mentioned in the first post, if I |
Errors are logged to the extension's console, not the target pages'.
This is by design. Scripts modify responses, and when they fail to (i.e: when they throw an error), the responses should not be touched. In case you want to display some error message when your script throws, just wrap it with a try catch. |
thanks for response, how do you open extensions dev tools? i couldn't find an easy way to open it (i managed to open it, but still want to know how do you suggest) I also wanted to set status code to 501, do you have any suggestion how to do it? |
Errors are logged to the extension's Options page's console to be precise.
There doesn't seem a way to change status codes. You can try altering headers and responses or redirecting requests to your custom server to see if it works. |
I'm testing this addon out and I see that even throwing error wont' break fetch
1- how to change response body?
2- how to change response code and cause an error?
3- how to correctly log, since I can't see the throw message in the console
The text was updated successfully, but these errors were encountered: