Skip to content

Handle aspnet validation errors with the exception handler#74

Merged
lsipii merged 3 commits intomainfrom
fix/dataspace-spec-validation-exception-responses
Sep 13, 2023
Merged

Handle aspnet validation errors with the exception handler#74
lsipii merged 3 commits intomainfrom
fix/dataspace-spec-validation-exception-responses

Conversation

@lsipii
Copy link
Copy Markdown
Contributor

@lsipii lsipii commented Sep 8, 2023

Muuttaa kontrollerin validaatiovirheviestin muodon dataspace:n speksin mukaiseksi:

  • nyt myös 422-virheet sujautetaan ErrorHandlerMiddleware-käsittelijän kautta, kun aikaisemmin aspnet ohitti sen ja tulosti frameworkin defaultmuodon virheelle
  • validaatiovirheviestin palauttama muoto nyt siis mallia:
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

@lsipii lsipii requested a review from LauriGofore September 8, 2023 08:20
Copy link
Copy Markdown
Contributor

@LauriGofore LauriGofore left a comment

Choose a reason for hiding this comment

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

LGTM, kuten sanotaan!

@lsipii lsipii merged commit c516847 into main Sep 13, 2023
@lsipii lsipii deleted the fix/dataspace-spec-validation-exception-responses branch September 13, 2023 14:27
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.

2 participants