summaryrefslogtreecommitdiff
path: root/Controllers/ApiFeedController.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-05-29 22:35:18 +1000
committerJake Mannens <jake@asger.xyz>2026-05-30 03:38:05 +1000
commitc3e9d39034e5afc3f2c3a12c8c7682eabe360b7d (patch)
tree73c5f43ec246f700a164ef700956b9d82b95f594 /Controllers/ApiFeedController.cs
parentcfd9959de69f9ab52e846e8acd232dc30d20aa27 (diff)
Modified controller endpoints to throw exceptions instead of returning HTTP responses on error
Diffstat (limited to 'Controllers/ApiFeedController.cs')
-rw-r--r--Controllers/ApiFeedController.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Controllers/ApiFeedController.cs b/Controllers/ApiFeedController.cs
index 382169e..068cc17 100644
--- a/Controllers/ApiFeedController.cs
+++ b/Controllers/ApiFeedController.cs
@@ -18,7 +18,7 @@ public class ApiFeedController : Controller {
[HttpPost]
public IActionResult FetchChunkAsync([FromBody] FeedRequest feedRequest) {
if(feedRequest.Count > 1000)
- return BadRequest("Total number of requested items exceeds maximum");
+ throw new ApiModels.ArgumentException("Total number of requested items exceeds maximum");
return Ok(feedService.LoadChunk(feedRequest).Select(m => m.Guid).ToArray());
}