refactor(connectors): refactor propagation of validation and not implemented errors (#419)

This commit is contained in:
Arjun Karthik
2023-01-20 12:07:01 +05:30
committed by GitHub
parent ef479e8186
commit c1de463cde
44 changed files with 534 additions and 295 deletions

View File

@ -160,7 +160,10 @@ impl ResponseError for ApplicationError {
}
pub fn http_not_implemented() -> actix_web::HttpResponse<BoxBody> {
ApiErrorResponse::NotImplemented.error_response()
ApiErrorResponse::NotImplemented {
message: api_error_response::NotImplementedMessage::Default,
}
.error_response()
}
#[derive(Debug, thiserror::Error)]
@ -196,7 +199,7 @@ pub enum ApiClientError {
UnexpectedServerResponse,
}
#[derive(Debug, thiserror::Error)]
#[derive(Debug, thiserror::Error, PartialEq)]
pub enum ConnectorError {
#[error("Error while obtaining URL for the integration")]
FailedToObtainIntegrationUrl,