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

Need better checks when refreshing credentials #269

Closed
ivanfmartinez opened this issue Nov 6, 2024 · 2 comments
Closed

Need better checks when refreshing credentials #269

ivanfmartinez opened this issue Nov 6, 2024 · 2 comments

Comments

@ivanfmartinez
Copy link

Describe the bug
I have received a new email from volvo with an OTP token, when I checked the logs of volvo2mqtt I found that was an error during refresh credentials.

In my case the server returned 504 error, which does not mean that credentials are invalid, just does not was able to fullfill request.

I have stopped and restarted the container without doing the OTP and the credentials on token_file are still valid and were refreshed when container is restarted.

To Reproduce:

Unable to manually reproduce

Expected behavior:

In some cases the refresh should be retried later without requesting a new login

I dont know what errors should be considered, but for now I think that 5xx can be considered as temporary error like the RequestException is considered.

I have added the 5xx check to my existing PR : #267

Version info:

docker v1.10.5

Logs:

volvo2mqtt    | Nov 06 07:39:36 volvo2mqtt [MainThread] [1] - INFO: Sending mqtt update...
volvo2mqtt    | Nov 06 07:39:36 volvo2mqtt [MainThread] [1] - INFO: Refreshing credentials
volvo2mqtt    | Nov 06 07:39:51 volvo2mqtt [MainThread] [1] - WARNING: Refreshing credentials failed!: 504 Message: upstream request timeout
volvo2mqtt    | Nov 06 07:39:51 volvo2mqtt [MainThread] [1] - INFO: Starting login with OTP

Copy link

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant