forked from loafle/openapi-generator-original
* [Java] [Native] Unify exception messages for async, add the status code The template has two methods for creating API exceptions, and the enhancements from #9169 didn't make it to the async version. - unify the signatures of the two methods (name, arguments) - make sure the sync version is not generated with asyncNative - extract the formatting logic into a common formatExceptionMessage() method - add the status code to the exception message as well, not just the body - shortened "call received non-success response" to a more concise "call failed with" * Treat an empty body the same as a null body Co-authored-by: Jens Fischer <jens.fischer@vier.ai>