Skip to content

Add validation error codes documentation for Notifications API#2639

Draft
olebhansen wants to merge 2 commits intomasterfrom
feature/notifications-validation-error-codes
Draft

Add validation error codes documentation for Notifications API#2639
olebhansen wants to merge 2 commits intomasterfrom
feature/notifications-validation-error-codes

Conversation

@olebhansen
Copy link
Copy Markdown
Contributor

@olebhansen olebhansen commented Jan 21, 2026

Summary

Updates the Notifications API error codes reference documentation to include the new validation error codes.

Changes

  • Adds explanation of two error code formats:
    • Business errors: NOT-XXXXX
    • Validation errors: NOT.VLD-XXXXX
  • Adds example response showing the validationErrors array format
  • Documents all 30+ validation error codes in organized tables by category

Related

Test plan

  • Preview documentation renders correctly
  • Tables are properly formatted
  • Code examples are correctly displayed

🤖 Generated with Claude Code

Summary by CodeRabbit

Documentation

  • Restructured error code reference documentation for improved clarity and usability
  • Introduced explicit separation between business error codes (NOT-XXXXX) and validation error codes (NOT.VLD-XXXXX) formats
  • Added comprehensive validation error code reference with organized categories (request validation, timing, endpoints, recipients, email/SMS settings, reminders, channel schema, status feed, integration validation)
  • Enhanced documentation with JSON example responses demonstrating validation error handling and machine-readable error identification

✏️ Tip: You can customize this high-level summary in your review settings.

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>
@olebhansen olebhansen requested a review from martivj January 21, 2026 16:52
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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 23, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'auto_resolve_threads'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Documentation restructured to delineate error codes into two categories: Business Errors (NOT-XXXXX) and Validation Errors (NOT.VLD-XXXXX). Added comprehensive validation error codes table with multiple validation categories and their associated codes across English and Norwegian Bokmål documentation.

Changes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@olebhansen olebhansen marked this pull request as ready for review January 23, 2026 12:43
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +23 to +26
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`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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`).

Comment on lines +23 to +26
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`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@martivj martivj marked this pull request as draft January 23, 2026 12:57
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.

Update documentation with validation error codes

1 participant