kadai-io / kadai

Lightweight library for general purpose task management
Apache License 2.0
3 stars 7 forks source link

Unnecessarily printed stacktraces in REST API #45

Open jamesrdi opened 3 weeks ago

jamesrdi commented 3 weeks ago

TODO: We have to try first if we can shorten the error

It would be better not to print the full stacktrace in precise error case

2023-03-24T08:56:37.5119304Z 2023-03-24 08:56:37.482 ERROR 1876 --- [-auto-52-exec-1] p.t.c.rest.TaskanaRestExceptionHandler : Error occurred during processing of rest request: ExceptionRepresentationModel [error=ErrorCode [key=CLASSIFICATION_WITH_ID_NOT_FOUND, messageVariables={classificationId=CLI:200000000000000000000000000000000004}], status=404, exception=pro.taskana.classification.api.exceptions.ClassificationNotFoundException, message=Classification with id 'CLI:200000000000000000000000000000000004' wasn't found, path=/api/v1/classifications/CLI:200000000000000000000000000000000004] 2023-03-24T08:56:37.5120804Z 2023-03-24T08:56:37.5121963Z pro.taskana.classification.api.exceptions.ClassificationNotFoundException: Classification with id 'CLI:200000000000000000000000000000000004' wasn't found 2023-03-24T08:56:37.5123737Z at pro.taskana.classification.internal.ClassificationServiceImpl.getClassification(ClassificationServiceImpl.java:100) ~[taskana-core-6.0.2.jar:6.0.2] 2023-03-24T08:56:37.5125181Z at pro.taskana.classification.rest.ClassificationController.getClassification(ClassificationController.java:110) ~[classes/:na] 2023-03-24T08:56:37.5126239Z at pro.taskana.classification.rest.ClassificationController$$FastClassBySpringCGLIB$$80c77314.invoke() ~[classes/:na] 2023-03-24T08:56:37.5127731Z at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.25.jar:5.3.25]