Skip to content

Commit

Permalink
[hotfix][rest] Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Oct 31, 2023
1 parent 780a673 commit 81d559a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,15 @@ default Collection<Class<?>> getResponseTypeParameters() {
* @return short description
*/
default String operationId() {
final String className = getClass().getSimpleName();

if (getHttpMethod() != HttpMethodWrapper.GET) {
throw new UnsupportedOperationException(
"The default implementation is only supported for GET calls. Please override 'operationId()'.");
"The default implementation is only supported for GET calls. Please override 'operationId()' in '"
+ className
+ "'.");
}

final String className = getClass().getSimpleName();
final int headersSuffixStart = className.lastIndexOf("Headers");
if (headersSuffixStart == -1) {
throw new IllegalStateException(
Expand Down

0 comments on commit 81d559a

Please sign in to comment.