Skip to content

bLIP-51: Specify invalid token error code#68

Merged
TheBlueMatt merged 1 commit into
lightning:masterfrom
tnull:2025-12-blip51-spec-invalid-token-error-code
Jan 14, 2026
Merged

bLIP-51: Specify invalid token error code#68
TheBlueMatt merged 1 commit into
lightning:masterfrom
tnull:2025-12-blip51-spec-invalid-token-error-code

Conversation

@tnull

@tnull tnull commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Previously the spec said that the LSP should return 'an error' in case of an invalid or unrecogized token. To keep the approach similar to what we do in bLIP-52 (where we specify a particular error code for this case), we now here specify an error code to be used in this case.

Previously the spec said that the LSP should return 'an error' in case
of an invalid or unrecogized token. To keep the approach similar to what
we do in bLIP-52 (where we specify a particular error code for this
case), we now here specify an error code to be used in this case.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 12, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 12, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 12, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 12, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 12, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Dec 15, 2025
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
Comment thread blip-0051.md
| -32602 | Invalid params | {"property": %invalid_property%, "message": %human_message% } | Invalid method parameter(s). |
| 001 | Client rejected | {"message": %human_message% } | [LSPS0.client_rejected_error][] |
| 100 | Option mismatch | {"property": %option_mismatch_property%, "message": %human_message% } | The order doesnt match the options defined in `lsps1.get_info.options`. |
| 102 | Unrecognized or stale token | {} | The provided token was unrecognized or stale. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why not 101?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why not 101?

Because 101 is the get_info "Not found" error code. AFAIR, error codes should be unique per spec, not per request type.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, it might make sense to define the errors in a central place then.

@TheBlueMatt TheBlueMatt merged commit c93a73d into lightning:master Jan 14, 2026
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 4, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 11, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 11, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 25, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Feb 25, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 2, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 16, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 17, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 17, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.

Signed-off-by: Elias Rohrer <dev@tnull.de>
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.

Signed-off-by: Elias Rohrer <dev@tnull.de>
tnull added a commit to tnull/rust-lightning that referenced this pull request Mar 18, 2026
We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
lightning/blips#68.

Signed-off-by: Elias Rohrer <dev@tnull.de>
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.

3 participants