Skip to content

Comments

Add ARC-compatible status code to TransactionStatus responses#23

Draft
shruggr wants to merge 4 commits intomainfrom
fix/arc-status-code
Draft

Add ARC-compatible status code to TransactionStatus responses#23
shruggr wants to merge 4 commits intomainfrom
fix/arc-status-code

Conversation

@shruggr
Copy link
Collaborator

@shruggr shruggr commented Feb 18, 2026

Summary

  • Adds StatusCode int field (json:"status,omitempty") to TransactionStatus model
  • Sets StatusCode = 200 in route handlers (handlePostTx, handlePostTxs, handleGetTx) and webhook delivery
  • Required for ARC API compatibility — the go-sdk ArcResponse expects a status int in the JSON body, which clients like 1sat-indexer use to distinguish success (200) from not-found (404) when querying transaction status

Test plan

  • go build ./... passes
  • go test ./... passes
  • Verify GET /tx/{txid} response includes "status": 200
  • Verify POST /tx response includes "status": 200
  • Verify webhook callbacks include "status": 200 in payload

🤖 Generated with Claude Code

The go-sdk's ArcResponse expects a `status` int field in the JSON body
representing the HTTP status code. Clients like 1sat-indexer rely on this
to distinguish 200 vs 404 responses when querying transaction status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shruggr shruggr requested a review from mrz1836 as a code owner February 18, 2026 00:08
@github-actions github-actions bot added size/XS Very small change (≤10 lines) bug-P3 Lowest rated bug, affects nearly none or low-impact feature Any new significant addition labels Feb 18, 2026
shruggr and others added 2 commits February 18, 2026 00:16
Ensures the JSON body includes `"status": 404` so ARC clients can
detect not-found via the response body, not just the HTTP status code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update ErrorFields references from errors.ErrorFields to arcerrors.ErrorFields
in swagger annotations, and regenerate docs to include new status field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrz1836 mrz1836 marked this pull request as draft February 19, 2026 14:15
@mrz1836
Copy link
Collaborator

mrz1836 commented Feb 19, 2026

@shruggr put back to draft:

  1. there are things in the PR body that might be incomplete, not sure
  2. CI has some linter/pre-commit issues

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

Labels

bug-P3 Lowest rated bug, affects nearly none or low-impact feature Any new significant addition size/XS Very small change (≤10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants