Add validation error codes documentation for Notifications API#2639
Add validation error codes documentation for Notifications API#2639olebhansen wants to merge 2 commits intomasterfrom
Conversation
Updates the error codes reference to include: - New error code format section explaining both business errors (NOT-XXXXX) and validation errors (NOT.VLD-XXXXX) - Example response showing the validationErrors array format - Complete table of all 30+ validation error codes organized by category: - Basic request validation - Send time validation - Condition endpoint validation - Recipient validation - Email/SMS settings validation - Reminder validation - Channel schema validation - Status feed validation - Dialogporten validation Related to: Altinn/altinn-notifications#1189 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add note explaining that DialogId and TransmissionId validations only verify the GUID format is correct, not that the referenced dialog or transmission actually exists in Dialogporten. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Error Code Documentation Restructuring content/notifications/reference/error-codes/_index.en.md, content/notifications/reference/error-codes/_index.nb.md |
Separated error code documentation into two distinct sections: Business Errors (NOT-XXXXX format with RFC7807 references) and Validation Errors (NOT.VLD-XXXXX format). Added comprehensive validation error codes table with 10+ categories (Basic Request Validation, Send Time Validation, Condition Endpoint Validation, Recipient Validation, Email/SMS Settings Validation, Reminder Validation, Channel Schema Validation, Status Feed Validation, Dialogporten Validation). Included example JSON response snippets and reformatted overall documentation flow. Changes applied consistently to both English and Norwegian Bokmål versions. (+138/-2 lines in each file) |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🔍 Errors now sorted, neat and clear,
Business and validation, no more fear!
NOT codes dance, VLD ones stay,
Docs restructured in every way! 📋✨
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the primary change: adding validation error codes documentation for the Notifications API, which aligns with the detailed documentation additions across both English and Norwegian files. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@content/notifications/reference/error-codes/_index.en.md`:
- Around line 23-26: The last bullet in the validation errors list is missing
terminal punctuation; update the final list item ("- A `validationErrors` array
with individual validation errors, each with its own `code`") to end with a
period so the bullet list reads: include a period at the end of the
`validationErrors` item (the line mentioning `STD-00000` and
`validationErrors`).
In `@content/notifications/reference/error-codes/_index.nb.md`:
- Around line 23-26: The bullet list in the markdown block ending with "hver med
sin egen `code`" lacks terminal punctuation; update that final list item by
appending a period so the line reads "...hver med sin egen `code`." to satisfy
grammar checks and guidelines.
| Validation errors are returned when the request contains invalid data. The response contains: | ||
| - A top-level `code` with value `STD-00000` | ||
| - A `validationErrors` array with individual validation errors, each with its own `code` | ||
|
|
There was a problem hiding this comment.
Add terminal punctuation after the bullet list.
The bullet list ends without punctuation; add a period after the last bullet to satisfy grammar checks and improve readability.
🧰 Tools
🪛 LanguageTool
[grammar] ~25-~25: Please add a punctuation mark at the end of paragraph.
Context: ...vidual validation errors, each with its own code **Example validation error resp...
(PUNCTUATION_PARAGRAPH_END)
🤖 Prompt for AI Agents
In `@content/notifications/reference/error-codes/_index.en.md` around lines 23 -
26, The last bullet in the validation errors list is missing terminal
punctuation; update the final list item ("- A `validationErrors` array with
individual validation errors, each with its own `code`") to end with a period so
the bullet list reads: include a period at the end of the `validationErrors`
item (the line mentioning `STD-00000` and `validationErrors`).
| Valideringsfeil returneres når forespørselen inneholder ugyldig data. Responsen inneholder: | ||
| - En overordnet `code` med verdi `STD-00000` | ||
| - Et `validationErrors`-array med individuelle valideringsfeil, hver med sin egen `code` | ||
|
|
There was a problem hiding this comment.
Add terminal punctuation after the bullet list.
The bullet list ends without punctuation; add a period after the last bullet to satisfy grammar checks and improve readability. As per coding guidelines.
🤖 Prompt for AI Agents
In `@content/notifications/reference/error-codes/_index.nb.md` around lines 23 -
26, The bullet list in the markdown block ending with "hver med sin egen `code`"
lacks terminal punctuation; update that final list item by appending a period so
the line reads "...hver med sin egen `code`." to satisfy grammar checks and
guidelines.
Summary
Updates the Notifications API error codes reference documentation to include the new validation error codes.
Changes
NOT-XXXXXNOT.VLD-XXXXXvalidationErrorsarray formatRelated
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.