Skip to content

Fail fast on empty auth credentials; log real device instance creation errors - #138

Merged
antoncxx merged 1 commit into
mainfrom
fix/auth-empty-credentials-error-handling
Jul 30, 2026
Merged

Fail fast on empty auth credentials; log real device instance creation errors#138
antoncxx merged 1 commit into
mainfrom
fix/auth-empty-credentials-error-handling

Conversation

@antoncxx

Copy link
Copy Markdown
Collaborator

Previously, if the server approved a device but sent no AppId/AppSecret (e.g. device already marked authorized server-side but the client's local secret store was cleared), the client silently accepted the approval and only failed later in send_authenticate with a vague "AppId not set", causing an infinite reconnect loop instead of surfacing a clear error. await_authorization now falls back to cached credentials and fails immediately if none are available, routing into the existing error-state path.

Also, add_device_instance previously swallowed the real error from create_device_instance behind a generic "Failed to create device instance" status. It's now logged alongside the generic client-facing message for easier diagnosis.

…n errors

Previously, if the server approved a device but sent no AppId/AppSecret
(e.g. device already marked authorized server-side but the client's local
secret store was cleared), the client silently accepted the approval and
only failed later in send_authenticate with a vague "AppId not set",
causing an infinite reconnect loop instead of surfacing a clear error.
await_authorization now falls back to cached credentials and fails
immediately if none are available, routing into the existing error-state
path.

Also, add_device_instance previously swallowed the real error from
create_device_instance behind a generic "Failed to create device instance"
status. It's now logged alongside the generic client-facing message for
easier diagnosis.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@antoncxx
antoncxx merged commit 086fd33 into main Jul 30, 2026
2 of 3 checks passed
@antoncxx
antoncxx deleted the fix/auth-empty-credentials-error-handling branch July 30, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant