You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only log class name on ToolCallingAutoConfiguration#ClassNotFoundException in getClassOrNull
Fixesspring-projects#4205Fixesspring-projects#4249
Auto-cherry-pick to 1.0.x
The getClassOrNull method is designed to gracefully handle missing classes
by returning null, but was logging full stack traces for ClassNotFoundException
which could mislead users into thinking there's an actual problem.
Changes:
- Log only the class name when ClassNotFoundException occurs
- Add type safety check for RuntimeException subclasses
- Add separate handling for other exceptions with full stack trace
- Improve log message clarity to reduce user confusion
This maintains the expected behavior while providing cleaner, less alarming
log output for normal class-not-found scenarios.
Signed-off-by: Sun Yuhan <[email protected]>
Signed-off-by: 家娃 <[email protected]>
Copy file name to clipboardExpand all lines: auto-configurations/models/tool/spring-ai-autoconfigure-model-tool/src/main/java/org/springframework/ai/model/tool/autoconfigure/ToolCallingAutoConfiguration.java
0 commit comments