fix(uplifts): place forbidden handler on request endpoint

This commit is contained in:
Alexandre Brandizzi 2026-09-22 23:30:14 -03:00
parent ff6a5945f1
commit f4284badf2

View file

@ -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") });