Skip to content

fix(ZMSKVR-1449): use error type for all captcha API error messages#2511

Open
ThomasAFink wants to merge 1 commit into
mainfrom
fix-zmskvr-1449-captcha-error-type
Open

fix(ZMSKVR-1449): use error type for all captcha API error messages#2511
ThomasAFink wants to merge 1 commit into
mainfrom
fix-zmskvr-1449-captcha-error-type

Conversation

@ThomasAFink
Copy link
Copy Markdown
Member

@ThomasAFink ThomasAFink commented Jun 2, 2026

Align captcha errorType with red muc-callout styling in zmscitizenview.

Pull Request Checklist (Feature Branch to next):

  • Ich habe die neuesten Änderungen aus dem next Branch in meinen Feature-Branch gemergt.
  • Relevante Tests wurden mit zmsautomation ausgeführt.
  • Das Code-Review wurde abgeschlossen.
  • Fachliche Tests wurden durchgeführt und sind abgeschlossen.
  • Ich habe erforderliche Dokumentation im Ordner docs hinzugefügt.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced captcha error notifications. Captcha-related errors—including verification failures, missing captcha fields, invalid entries, and expired captchas—are now displayed with error-level severity instead of warnings. This provides users with more appropriate visual feedback and clearer indication of critical issues during the captcha verification process.

Align captcha errorType with red muc-callout styling in zmscitizenview.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ff0712d1-8d2d-4b67-b746-e7fef1c88d1b

📥 Commits

Reviewing files that changed from the base of the PR and between 86ccf78 and e32e5a7.

📒 Files selected for processing (2)
  • zmscitizenapi/src/Zmscitizenapi/Utils/ErrorMessages.php
  • zmscitizenview/tests/unit/Appointment/AppointmentSelection.spec.ts

📝 Walkthrough

Walkthrough

This PR upgrades captcha verification errors from warning-level to error-level severity. The backend error definitions in ErrorMessages.php are updated to classify captchaVerificationFailed and related captcha errors as 'error' instead of 'warning'. The corresponding frontend test in AppointmentSelection.spec.ts is updated to expect and verify captcha errors are rendered as error-type callouts.

Changes

Captcha Error Severity Upgrade

Layer / File(s) Summary
Captcha Error Severity Upgrade
zmscitizenapi/src/Zmscitizenapi/Utils/ErrorMessages.php, zmscitizenview/tests/unit/Appointment/AppointmentSelection.spec.ts
Backend error type definitions for captchaVerificationFailed, captchaVerificationError, captchaMissing, captchaInvalid, and captchaExpired are changed from 'warning' to 'error'. Frontend test expectations are updated to verify captcha errors render as error-level callouts with correct translation keys.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 A warning once lived in the captcha's embrace,
But errors rose up to take its place.
From backend to test, we changed the call,
Now verification failures stand proud and tall! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 main change: converting captcha-related API error messages from 'warning' to 'error' errorType across both backend and test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-zmskvr-1449-captcha-error-type

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants