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

Incorrect/unclear HTTP response codes #226

Open
llamafilm opened this issue Mar 31, 2024 · 4 comments
Open

Incorrect/unclear HTTP response codes #226

llamafilm opened this issue Mar 31, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@llamafilm
Copy link

The Fleet API documentation describes a variety of HTTP response codes which are helpful for building error handling logic. But I sometimes get a 500 response when a different code would be more appropriate.

500: {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}

This should be 408.

500: {"response":null,"error":"vehicle rejected request: your public key has not been paired with the vehicle","error_description":""}

This seems closer to 401 or 412.

500: {"response":null,"error":"context deadline exceeded","error_description":""}

OK, 500 makes sense here.

@vbarrier
Copy link

Hello,

do you see a pattern behind this error?

500: {"response":null,"error":"context deadline exceeded","error_description":""}

I get a lot of that one..

@jamesdeck
Copy link

Hello,

do you see a pattern behind this error?

`500: {"response":null,"error":"context deadline exceeded","error_description":""}

`

I get a lot of that one..

I've been seeing this lately and a reboot of the car seems to clear it up immediately.

@vbarrier
Copy link

Reboot the car is not an option for us :'( (as rental company)

Hello @sethterashima any thoughts on this?

@thefireblade
Copy link
Collaborator

The status code for vehicle unavailable: vehicle is offline or asleep is currently 503, though I agree that this should be 408

I also agree that this error vehicle rejected request: your public key has not been paired with the vehicle should be closer to a 403 or 412.

I've filed an internal ticket to address this

@thefireblade thefireblade added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants