Back

return response code function json

  • 0
  • Functions
  • Cloud
bluesky
27 Nov, 2023, 08:56

Anyone have an idea how to return response code if fail requests some data.

It's always said error 500 for return response status code 422.

TL;DR
The user is asking how to return the response code when making requests. They are using the `requests` module in Python. They also ask for the meaning of the term "package". Another user asks for the link to the package being used. The final message mentions that even though they should be getting a response status code of 422, it always shows error 500. Solution: To return the response code, use the `status_code` attribute of the response object in the `requests` module. The error 500 could be due to a server-side issue.
bluesky
27 Nov, 2023, 08:57
sswastik02
27 Nov, 2023, 09:46

Can you send the link to the package you are using to make requests in the function?

bluesky
27 Nov, 2023, 09:47

What's meaning package?

requests (python) ?

bluesky
27 Nov, 2023, 09:47

I'm using requests modul

sswastik02
27 Nov, 2023, 09:47

Ok

Drake
27 Nov, 2023, 17:05

what's it say for the status code at the right side?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more