spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
376 stars 309 forks source link

CassandraExceptionTranslator adds whole CQL statement to the Exception message #1323

Closed vkorenev closed 1 year ago

vkorenev commented 1 year ago

CassandraExceptionTranslator.buildMessage adds whole CQL statement to the message of the exception being thrown. While this can be helpful for debugging, there are some cases when this causes some problems:

Possible solutions:

mp911de commented 1 year ago

Spring aims for providing as much context as possible so you, as the developer, can spot problems easily. You can tweak exception translation behavior by either subclassing CqlTemplate and override the translate(String, String cql, RuntimeException) method or configure the Template API with a CqlExceptionTranslator that suits your needs. All extension points are accessible.

spring-projects-issues commented 1 year ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 1 year ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.