From c2eb59aaf6a1a01e195cdaa5156b7d490562826b Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Sun, 17 Mar 2024 13:33:11 -0400 Subject: [PATCH] throw endpoint --- Sentaur.Leaderboard.Api/Program.cs | 5 +++++ Sentaur.Leaderboard.Api/Sentaur.Leaderboard.Api.http | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Sentaur.Leaderboard.Api/Program.cs b/Sentaur.Leaderboard.Api/Program.cs index 7d78114..57661b4 100644 --- a/Sentaur.Leaderboard.Api/Program.cs +++ b/Sentaur.Leaderboard.Api/Program.cs @@ -153,4 +153,9 @@ return Results.Problem($"Failed to remove provided entry with name '{name}' and score '{score}'"); }); +app.MapGet("/throw", (string? text) => +{ + throw new Exception("Testing exception thrown in endpoint: " + text); +}); + app.Run(); diff --git a/Sentaur.Leaderboard.Api/Sentaur.Leaderboard.Api.http b/Sentaur.Leaderboard.Api/Sentaur.Leaderboard.Api.http index a1cceec..cf78546 100644 --- a/Sentaur.Leaderboard.Api/Sentaur.Leaderboard.Api.http +++ b/Sentaur.Leaderboard.Api/Sentaur.Leaderboard.Api.http @@ -11,9 +11,9 @@ Accept: application/json ### -DELETE https://sentaur-leaderboard-f7z2cjcdzq-uc.a.run.app/score?name=test&score=test +DELETE https://sentaur-leaderboard-f7z2cjcdzq-uc.a.run.app/score?name=Bracing&score=2621 Accept: application/json - +Authorization: Bearer ###