Document localized API error messages - #296
Conversation
533fdc2 to
4042f03
Compare
- payload_too_large may include the known limit in parentheses (100KB). - invalid_global_invoice_period uses stable, untranslated period values.
{period} keeps a stable canonical value and is localized at render time
(e.g. año/year, bimestre/two-month period).
There was a problem hiding this comment.
🟡 Changes recommended
The cURL examples use incorrect Bearer authentication, Java examples reference a stale SDK version, and one error description contradicts the stated unchanged contract.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Documents localized API V2 error messages and Accept-Language usage across guides and OpenAPI descriptions.
Changes:
- Adds language-selection behavior and SDK/cURL examples.
- Updates localized error documentation and examples.
- Synchronizes Spanish/English OpenAPI descriptions and Java installation snippets.
File summaries
| File | Description |
|---|---|
website/openapi_v2.yaml |
Spanish API description update |
website/openapi_v2.en.yaml |
English API description update |
website/docs/getting-started/errors.mdx |
Spanish error localization guide |
website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/errors.mdx |
English error localization guide |
website/docs/getting-started/install.mdx |
Spanish Java version update |
website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/install.mdx |
English Java version update |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 7
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Facturapi authenticates with HTTP Basic, so the cURL example now passes the API key with -u instead of an Authorization: Bearer header.
Point the Maven and Gradle snippets to 2.2.0, the latest published version, in both languages.
Leave the documented description of payload_too_large as published so this update only adds the localization content.
|
Corrección: revertido el cambio a Basic auth (c305d43). El API v2 documenta y usa Bearer; los curl vuelven a Bearer. |
|
While touching these specs: |
Documents how API V2 clients select English or Spanish error messages with
Accept-Language, including regional variants, weighted preferences, Spanish fallback, and the fields that remain language-independent.Adds verified examples for cURL and each official SDK using their existing custom-header support. The existing published error-code descriptions remain unchanged. The Java installation example now uses
2.1.0, the latest published release.Also mentions the language header in both V2 OpenAPI descriptions.
Validation: the Docusaurus production build passed for Spanish and English.