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 quarkusio#36236

(cherry picked from commit 82c1323)
  • Loading branch information
mkouba authored and gsmet committed Oct 17, 2023
1 parent 1038a41 commit 15762ce
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 15762ce

Please sign in to comment.