Propagate user app ownership conflict.
This commit is contained in:
@@ -50,6 +50,15 @@ impl IntoResponse for AppError {
|
||||
Self::Repository(RepositoryError::Decode(error)) => {
|
||||
tracing::error!(%error, "invalid stored data");
|
||||
}
|
||||
Self::Repository(RepositoryError::OwnershipConflict {
|
||||
relation: ReferenceRelation::UserApp,
|
||||
}) => {
|
||||
tracing::warn!("user app ownership conflict");
|
||||
return error_response(StatusCode::CONFLICT, "User app belongs to another user");
|
||||
}
|
||||
Self::Repository(RepositoryError::OwnershipConflict { relation }) => {
|
||||
tracing::error!(%relation, "unhandled ownership conflict");
|
||||
}
|
||||
Self::Repository(RepositoryError::ReferenceViolation {
|
||||
relation: ReferenceRelation::User,
|
||||
kind: ReferenceViolationKind::Missing,
|
||||
|
||||
Reference in New Issue
Block a user