Skip to content

docs(openapi): show the real carrier error codes in tracking request examples - #444

Merged
dodeja merged 2 commits into
mainfrom
docs/scac-error-examples
Oct 17, 2026
Merged

dodeja merged 2 commits into
mainfrom
docs/scac-error-examples

Conversation

@dodeja

@dodeja dodeja commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Why

This follows up a review comment on #440. The POST /tracking_requests 422 example showed code: "blank" at /data/attributes/scac for an SCAC that is not blank. The API does not return that.

The tracking request model validates the carrier in validate_scac_is_supported. It adds one of these error types: not_recognized, no_integration, no_container_request_type_support, or no_request_type_support. The jsonapi.rb ActiveModelErrorSerializer copies the error type into code. The API returns blank only from validates :scac, presence: true, so only when the SCAC is empty.

What changed

In the "Error Examples" example of the POST /tracking_requests 422 response in docs/openapi.json:

  • Scac 'XXXX' is not recognized now has code: "not_recognized".
  • Scac 'UALC' is not supported. We do not currently integrate with Universal Africa Lines now has code: "no_integration".

The Scac can't be blank and Request number can't be blank entries keep code: "blank". The detail strings already match the backend locale file and the backend request spec. No other example in the spec uses this pattern.

Verification

  • All 185 response examples in docs/openapi.json validate against their schemas (Ajv, OAS 3.0 nullable semantics). 0 fail.
  • npm run generate:types --workspace @terminal49/sdk produces no diff, because named examples are not emitted into the generated types.
  • npx vp run check passes.
  • npx vp run test passes: 153, 443, and 387 tests across the three workspaces.
  • Spectral could not run locally because the remote ruleset that .spectral.mjs imports returns 404. This failure is not caused by this change.
  • The Postman collection is left for the CI bot to regenerate.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

RetriggerView in GreptileConfidence Score: 5/5

This documentation-only change appears safe to merge.

Summary

Corrects two carrier error codes in the POST /tracking_requests 422 response example.

  • Tracking request examples show the right code for each carrier error.

No actionable issues found.

Reviews (1) · Last reviewed commit: "docs(openapi): show the real carrier err..." · Reviewed by Greptile

…examples

The POST /tracking_requests 422 example showed code "blank" for an
unrecognized SCAC and for an unsupported carrier. The API never returns
that. The tracking request model adds not_recognized or no_integration,
and the JSON:API error serializer copies that error type into code.
Code "blank" only appears when the SCAC is empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
terminal49 🟢 Ready View Preview Oct 17, 2026, 6:51 AM

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Oct 17, 2026 6:51am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T06:51:38.424712Z 46f5a79 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dodeja
dodeja merged commit 558ce0e into main Oct 17, 2026
5 checks passed
dodeja added a commit that referenced this pull request Oct 17, 2026
Brings in #434, #437 and #444. The only conflict was the generated
Terminal49-API.postman_collection.json. This branch does not change
docs/openapi.json, so it takes main's generated collection unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dodeja added a commit that referenced this pull request Oct 17, 2026
Brings in #434, #437 and #444. The only conflict was the generated
Postman collection: took main's copy and regenerated it from the merged
docs/openapi.json with openapi-to-postmanv2@6.3.0. SDK types, MCP filter
schemas and SDK reference docs regenerate unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — fe2a7ddb Deployed Oct 17, 2026 by vercel[bot]
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