-
Notifications
You must be signed in to change notification settings - Fork 10
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
common: request throws if parseAs is json and the response body is empty #906
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Hi @hunterachieng, can you update the PR description please? You need to:
|
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
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.
Almost there - just a couple of comments left to address. It's worth getting this right: change to common can affect every other adaptor, so getting it right now will save us problems in other adaptors in the future (if we'd done this right in the first place, you wouldn't be having to do this at all!)
Signed-off-by: Hunter Achieng <[email protected]>
Hi @mtuchi - can you run Remember we don't have to push tags any more :) Just push the version bumps and merge to release. Don't worry about the warnings when you version. Thanks! I'll be online around 10am GMT if there are any problems. You'll be online way before me and can unblock Hunter quicker 🙏 |
Summary
An error is thrown when we use
parseAs=json
if the response body is undefined whenPUT
orPOST
requests are madeFixes #689
Details
In
common
, we mainly parse the response body, but since we might get an empty body with different requests, we are returningundefined
for the body else parse as expectedAI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
dev only changes don't need a changeset.