Skip to content

Commit

Permalink
feat(feat/api_event_errors): i -> api_error
Browse files Browse the repository at this point in the history
  • Loading branch information
ivor11 committed Nov 16, 2023
1 parent 5d68346 commit 030811d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/api_models/src/errors/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ impl serde::ser::Serialize for ApiErrorResponse {
{
use serde::ser::SerializeStruct;
match self {
Self::Unauthorized(i)
| Self::ForbiddenCommonResource(i)
| Self::ForbiddenPrivateResource(i)
| Self::Conflict(i)
| Self::Gone(i)
| Self::Unprocessable(i)
| Self::InternalServerError(i)
| Self::NotImplemented(i)
| Self::NotFound(i)
| Self::MethodNotAllowed(i)
| Self::BadRequest(i)
| Self::ConnectorError(i, _) => {
Self::Unauthorized(api_error)
| Self::ForbiddenCommonResource(api_error)
| Self::ForbiddenPrivateResource(api_error)
| Self::Conflict(api_error)
| Self::Gone(api_error)
| Self::Unprocessable(api_error)
| Self::InternalServerError(api_error)
| Self::NotImplemented(api_error)
| Self::NotFound(api_error)
| Self::MethodNotAllowed(api_error)
| Self::BadRequest(api_error)
| Self::ConnectorError(api_error, _) => {
let mut state = serializer.serialize_struct("ApiErrorResponse", 2)?;
state.serialize_field("type", &self.error_type_name())?;
state.serialize_field("value", i)?;
state.serialize_field("type", &self.to_string())?;
state.serialize_field("value", api_error)?;
state.end()

// serializer.serialize_newtype_variant("ApiErrorResponse", 0, "xyz", i)
Expand Down

0 comments on commit 030811d

Please sign in to comment.