[
https://issues.apache.org/jira/browse/CASSANDRASC-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533112#comment-17533112
]
ASF subversion and git services commented on CASSANDRASC-36:
------------------------------------------------------------
Commit 4be21e717a8dc18d982c1c03d8d100e1da3f2080 in cassandra-sidecar's branch
refs/heads/trunk from Francisco Guerrero
[ https://gitbox.apache.org/repos/asf?p=cassandra-sidecar.git;h=4be21e7 ]
CASSANDRASC-36: Support for ErrorHandler in Sidecar
This commit adds a default `ErrorHandler` to the `Route#failureHandler()`. The
default implementation
for Sidecar is the `JsonErrorHandler` implementation which is also provided as
part of this commit.
The `JsonErrorHandler` class serializes `HttpException`s and `REQUEST_TIMEOUT`s
to a JSON representation
that provides additional information to the response.
Additionally, we allow for custom implementations of the `ErrorHandler` to be
injected (via module
overrides). This allows downstream projects to provide custom implementations
of the `ErrorHandler` to
fit the specific needs of the project.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Saranya Krishnakumar and
Yifan Cai for CASSANDRASC-36
> Support for ErrorHandler route in Sidecar
> -----------------------------------------
>
> Key: CASSANDRASC-36
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-36
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Components: Configuration
> Reporter: Francisco Guerrero
> Assignee: Francisco Guerrero
> Priority: Normal
> Labels: pull-request-available
>
> Add a default {{Route#failureHandler()}} that returns a {{JSON}}
> representation of the error for {{io.vertx.ext.web.handler.HttpException}}
> as well as {{REQUEST_TIMEOUT}} errors.
> Additionally, we need to allow for custom implementations of the
> {{ErrorHandler}} interface to be injected. Downstream projects can provide
> custom implementations of the {{ErrorHandler}} to fit the needs of the
> project.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]