Skip to content

Absorb upstream #23: log the server's error when registration is refused - #6

Merged
fudio101 merged 1 commit into
mainfrom
fix/log-registration-error
Aug 14, 2026
Merged

Absorb upstream #23: log the server's error when registration is refused#6
fudio101 merged 1 commit into
mainfrom
fix/log-registration-error

Conversation

@fudio101

Copy link
Copy Markdown
Collaborator

Cherry-picks 4cc3dded from CamM2325/microlink#23 by @letalvoj, unchanged aside from a provenance trailer. Author attribution preserved via git cherry-pick -x.

Why we're absorbing this ourselves: upstream has had zero maintainer activity (no comments, no reviews) on any open PR since the last commit on 2026-03-17.

What it fixes: a refused registration is currently silent. RegisterResponse carries the reason in Error (e.g. "invalid key: API key does not exist" for a bad auth key), but do_register() only reads Node, which a successful response omits too — nothing distinguishes the two. The first visible symptom today is a misleading MapResponse ... node not found from the next request, pointing at peer fetching rather than the actual cause. This logs the real error.

Applied cleanly (git apply --check) against our diverged fork. Built clean for lilygo-t-display-s3 (ESP-IDF 6.0.1) in the downstream ZenClock project.

A refused registration is currently silent. RegisterResponse carries the
reason in Error — "invalid key: API key does not exist" for a bad auth
key — but do_register() only reads Node, which a successful response
omits too, so nothing tells the two apart.

The first visible symptom is therefore "node not found" from the
MapRequest that follows, reported by a different function and pointing at
peer fetching rather than at the key:

  E ml_coord: RegisterResponse error: invalid key: API key does not exist   (new)
  E ml_coord: MapResponse JSON parse failed near: node not found            (was all)

Tested against controlplane.tailscale.com on an ESP32-S3, with an unknown
machine key and an invalid auth key.

(cherry picked from commit 4cc3dde)
Upstream-PR: CamM2325#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.

2 participants