fix: fixed search of tidal tracks using WebUtils
This commit is contained in:
@@ -45,6 +45,10 @@ public class LinkController(LinksService linksService) : SwadController
|
||||
|
||||
case ServiceResult.NotFound:
|
||||
return NotFound(ErrorResources.NotFound);
|
||||
|
||||
case ServiceResult.TooManyRequests:
|
||||
return TooManyRequests("Yandex is shit, try again later.");
|
||||
|
||||
default:
|
||||
throw new ApplicationException("Unknown response from service");
|
||||
}
|
||||
|
||||
@@ -19,4 +19,10 @@ public abstract class ProblemsController : ControllerBase
|
||||
return Problem(statusCode: StatusCodes.Status502BadGateway, title: "Some problems in other side, dude!",
|
||||
detail: detail);
|
||||
}
|
||||
|
||||
protected ObjectResult TooManyRequests(string? detail)
|
||||
{
|
||||
return Problem(statusCode: StatusCodes.Status429TooManyRequests, title: "You are robot, dude!",
|
||||
detail: detail);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user