Skip to content

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

@ali-rantakari

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()) {

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