Skip to content
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

random 'NoneType' object has no attribute 'status_code' #792

Open
tyoc213 opened this issue May 10, 2024 · 1 comment
Open

random 'NoneType' object has no attribute 'status_code' #792

tyoc213 opened this issue May 10, 2024 · 1 comment
Labels
status: waiting for feedback waiting for feedback from the submitter

Comments

@tyoc213
Copy link

tyoc213 commented May 10, 2024

Issue Summary

When using await self.client.messages.create_async( where client is a twilio client, we got 'NoneType' object has no attribute 'status_code', this happens randomly and we dont know how to reproduce as all the other calls which I guess are thousands work as expected (with credentials and all that) but for some reason this happens time to time in our sentry issues.

I report it because it is happening inside library code.

Steps to Reproduce

  1. create a client
  2. send a request with await self.client.messages.create_async

Exception/Log

image

with extra frames

image

Technical details:

[tool.poetry.dependencies]
twilio = "^8.5.0"
python = ">=3.10,<3.11"
@tyoc213 tyoc213 changed the title 'NoneType' object has no attribute 'status_code' random 'NoneType' object has no attribute 'status_code' May 20, 2024
@tiwarishubham635
Copy link
Contributor

Ohh for some reason response is coming Null and that is not being caught. Can think of catching it before accessing status code

@tiwarishubham635 tiwarishubham635 added the status: waiting for feedback waiting for feedback from the submitter label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for feedback waiting for feedback from the submitter
Projects
None yet
Development

No branches or pull requests

2 participants