Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OptionsFormValidationError web error #127

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

janbritz
Copy link
Contributor

@janbritz janbritz commented Jan 7, 2025

Closes #122.

Wird ein OptionsFormValidationError während eines Requests geraised, so wird jetzt ein Fehler zurückgegeben, welcher dem RequestError ähnelt.

Ein Beispiel mit dem "minimal example"-Paket:

Request:

{
  "form_data": {
    "my_hidden": ""
  }
}

Response:

{
  "error_code": "INVALID_OPTIONS_FORM_DATA",
  "temporary": false,
  "reason": null,
  "errors": {
    "my_hidden": "Input should be 'foo'",
    "my_repetition": "Field required"
  }
}

@janbritz janbritz requested review from MartinGauk and MHajoha January 7, 2025 16:23
questionpy_server/web/_middlewares.py Outdated Show resolved Hide resolved
questionpy_server/web/errors.py Outdated Show resolved Hide resolved
@janbritz janbritz force-pushed the feat/options-form-validation-error branch from c8277a3 to 96a81e8 Compare January 27, 2025 16:42
@janbritz janbritz force-pushed the feat/options-form-validation-error branch from 96a81e8 to 70145d7 Compare January 27, 2025 16:44
@janbritz janbritz requested a review from MHajoha January 27, 2025 16:46
@janbritz janbritz merged commit 98d64d3 into dev Jan 28, 2025
6 checks passed
@janbritz janbritz deleted the feat/options-form-validation-error branch January 28, 2025 11:05
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.

OptionsFormValidationError im question Endpoint implementieren
2 participants