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
pyfetch: Do not raise an error on status code >= 400 #3986
pyfetch: Do not raise an error on status code >= 400 #3986
Conversation
string returns as it is valid to retrieve the bodies from these responses.
Thanks @owenlamont. I wonder if we might want to just change |
Thanks @owenlamont!
+1 with this. |
400 status check from _raise_if_failed, and added test for new behavior
Hope this looks better, I haven't been able to get a local build working to run tests myself - trying to follow the Linux Conda setup instructions on WSL 2 but running make gave me errors about too many open files and I tried to join the Gitter channel to ask about that, but Gitter locks up for me trying to open the pyodide community room from the link in the documentation (I had no trouble joining other rooms). |
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.
Thanks, @owenlamont! I have a minor comment about the test, otherwise looks good to me.
trying to follow the Linux Conda setup instructions on WSL 2 but running make gave me errors about too many open files
I'm not very sure about the too many open files issue but WSL2 has some issues with the file system, and it has some trouble especially when using the Windows file system in WSL2. So personally I don't recommend using WSL2 when building Pyodide.
Thanks again @owenlamont! |
Thanks for all the support @ryanking13 I appreciate all the work the Pyodide devs have done. |
Description
The previous logic was raising an OSError if a response returned a status code at 400 or greater but there are valid reasons to retrieve the bodies from such responses as they often contain additional information about the error that can be useful to the client - see issue 3974.
Checklists