Module: CommandTower::Workflows::Messaging::ErrorMapping
- Defined in:
- app/workflows/command_tower/workflows/messaging/error_mapping.rb
Class Method Summary collapse
Class Method Details
.http_status_for(error) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/workflows/command_tower/workflows/messaging/error_mapping.rb', line 9 def http_status_for(error) case error when CommandTower::Errors::ValidationError, CommandTower::Errors::Messaging::RecipientUnresolvedError, CommandTower::Errors::Messaging::AcceptRejectedError :unprocessable_entity when CommandTower::Errors::Messaging::IdempotencyConflictError :conflict when CommandTower::Errors::NotFoundError :not_found else :internal_server_error end end |