-
Notifications
You must be signed in to change notification settings - Fork 588
Fix: Pass api key in headers and detect html error #999
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
Conversation
…into fix-send-api-key-in-headers
…shot-labs/snapshot.js into fix-send-api-key-in-headers
} catch (e) { | ||
return Promise.reject({ | ||
code: 500, | ||
message: 'Failed to parse response from score API', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for message
, I think it's available from res
, so we could get something more descriptive like Network timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing it in data
param, as in this case error will be in HTML and can be unpredictable.if it is not HTML error we handle it seperately
Co-authored-by: Wan <[email protected]>
…shot-labs/snapshot.js into fix-send-api-key-in-headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utAck
Just noticed that this issue may be fixed with #957, which goal is to hide the raw response, and convert it to a more concise one |
Summary:
How to test:
test
folder, for examplevp.ts
with the local score API server