Skip to content

DDOC-1134: Add common error codes#902

Open
kojimaru14 wants to merge 11 commits intobox:mainfrom
kojimaru14:DDOC-1134-add-common-errors
Open

DDOC-1134: Add common error codes#902
kojimaru14 wants to merge 11 commits intobox:mainfrom
kojimaru14:DDOC-1134-add-common-errors

Conversation

@kojimaru14
Copy link
Copy Markdown

Description

Updates the Common error codes guide to document additional 400 OAuth/JWT-style errors (and related cleanup), adds invalid_token under 401 Unauthorized

Fixes # (issue)
Re DDOC-1134

Changes

  • Add rows for common token and JWT assertion errors (unauthorized_client, invalid_client, invalid_grant / invalid_request variants, etc.) and reorder the exp-claim invalid_grant row next to related entries.
  • Remove the redundant generic invalid_grant authorization-code message that duplicated newer rows.
  • Document invalid_token (401) with guidance on invalid/expired tokens and link to Refresh a token via guide://authentication/tokens/refresh.

Checklist

  • [ y ] My code follows the style guidelines of this project
  • [ y ] I have performed a self-review of my own changes
  • [ n ] I have run yarn lint to make sure my changes pass all linters
  • [ y ] I have pulled the latest changes from the upstream developer branch

Comment thread content/guides/api-calls/permissions-and-errors/common-errors.md Outdated
Comment thread content/guides/api-calls/permissions-and-errors/common-errors.md Outdated
Comment thread content/guides/api-calls/permissions-and-errors/common-errors.md Outdated
Comment thread content/guides/api-calls/permissions-and-errors/common-errors.md Outdated
kojimaru14 and others added 4 commits April 23, 2026 04:13
@kojimaru14 kojimaru14 requested a review from ianfre25 April 22, 2026 19:25
Hunspell/mdspell does not treat client_id as a normal word, so
common-errors.md failed lint:spelling in CI. Bump the dictionary word
count to match the new entry.
@kojimaru14
Copy link
Copy Markdown
Author

@ianfre25 Thank you for approving the change!

I see that CI for yarn lint failed due to the following error

[2] $ mdspell 'content/**/*.md' '!content/guides/box-ai/ai-agents/*.md' README.md CONTRIBUTING.md -a -n --en-us -d content/dictionaries/en_US -r
[2]     content/guides/api-calls/permissions-and-errors/common-errors.md
[2]        74 | type is unauthorized for this client_id. | 
[2]        75 | type is unauthorized for this client_id](https://support.box.com/hc/e 

https://github.com/box/developer.box.com/actions/runs/24797619426/job/72842248544

It appears that mdspell doesn't like "client_id" and treats it as misspelled. I have added "client_id" to content/dictionaries/en_US.dic since this is the word used in the raw error message and shouldn't be treated like that.

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