Skip to content

Generic (error) responses built from ControllerAdvice are nondeterministic #53

Description

@ali-rantakari

Thank you for providing this library.

Generic (error) responses built from ControllerAdvice exception handlers are built in an undefined order. In cases where multiple exception handler methods declare the same response status, which method’s return type ends up being used as the response schema for that status code is nondeterministic (might change between runs).

I’m speculating the issue is due to the use of the Set data type in iteration:

for (Map.Entry<String, ApiResponse> entry : apiResponses.entrySet()) {

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions