mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
fix(uplifts): place forbidden handler on request endpoint
This commit is contained in:
parent
ff6a5945f1
commit
f4284badf2
1 changed files with 10 additions and 10 deletions
|
|
@ -74,16 +74,6 @@ namespace Api.SeaHavenIndustries.Controllers
|
|||
{
|
||||
return NotFound(new Response { Status = "Error", Message = "Dispatch not found" });
|
||||
}
|
||||
catch (UpliftForbiddenException)
|
||||
{
|
||||
return StatusCode(
|
||||
StatusCodes.Status403Forbidden,
|
||||
new Response
|
||||
{
|
||||
Status = "Error",
|
||||
Message = UpliftForbiddenException.RequestUpliftsDeniedMessage
|
||||
});
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
return BadRequest(new Response { Status = "Error", Message = _logger.Sanitize(ex, "The requested action could not be completed for this dispatch") });
|
||||
|
|
@ -231,6 +221,16 @@ namespace Api.SeaHavenIndustries.Controllers
|
|||
{
|
||||
return NotFound(new Response { Status = "Error", Message = "Dispatch not found" });
|
||||
}
|
||||
catch (UpliftForbiddenException)
|
||||
{
|
||||
return StatusCode(
|
||||
StatusCodes.Status403Forbidden,
|
||||
new Response
|
||||
{
|
||||
Status = "Error",
|
||||
Message = UpliftForbiddenException.RequestUpliftsDeniedMessage
|
||||
});
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
return BadRequest(new Response { Status = "Error", Message = _logger.Sanitize(ex, "The requested action could not be completed for this dispatch") });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue