Add an explanatory message to the `OutputBuilderNotFoundException`
mwadams opened this issue · 0 comments
It is difficult to remember why an output builder might not be found, and an 'OutputBuidlerNotFoundException' thrown, though the reasons are actually quite simple.
It has been suggested in the past that we add logging to say "we've tried this one, and it didn't match for this reason", "we've tried that one and it didn't match for that reason", but that is verbose, and difficult to diagnose - at the very least it requires switching on debug logging and marrying up the log output with the stack trace.
It might be easier just to add We couldn't build output compatible with your OpenApiResponse definition in your service's result. Check the status code, required headers, and the media type of your response against the OpenApiResponse definition for the path in question.
to the exception message.