Skip to content

Commit

Permalink
Hibernate Reactive Panache: improve error message
Browse files Browse the repository at this point in the history
- when no current reactive session is found
- resolves #36236
  • Loading branch information
mkouba committed Oct 12, 2023
1 parent eb1e80d commit 82c1323
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ public static Uni<Mutiny.Session> getSession() {
}
} else {
throw new IllegalStateException("No current Mutiny.Session found"
+ "\n\t- no reactive session was found in the context and the context was not marked to open a new session lazily"
+ "\n\t- you might need to annotate the business method with @WithSession");
+ "\n\t- no reactive session was found in the Vert.x context and the context was not marked to open a new session lazily"
+ "\n\t- a session is opened automatically for JAX-RS resource methods annotated with an HTTP method (@GET, @POST, etc.); inherited annotations are not taken into account"
+ "\n\t- you may need to annotate the business method with @WithSession or @WithTransaction");
}
}
}
Expand Down

0 comments on commit 82c1323

Please sign in to comment.