Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit b0fa742

Browse files
committed
Aggiunto esempio StatusCode 501 - NotImplemented
1 parent eb5fc1a commit b0fa742

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/CustomLibrary.ProblemDetails.Sample/Controllers/TestController.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,18 @@ public async Task<IActionResult> GetExceptionInternalServerErrorAsync()
165165
return ResponseException.InternalServerError(HttpContext, exc);
166166
}
167167
}
168+
169+
[HttpGet("NotImplemented")]
170+
public async Task<IActionResult> GetExceptionNotImplementedAsync()
171+
{
172+
try
173+
{
174+
await Task.Delay(500);
175+
throw new Exception.NotImplementedException("Not Implemented");
176+
}
177+
catch (Exception.NotImplementedException exc)
178+
{
179+
return ResponseException.NotImplemented(HttpContext, exc);
180+
}
181+
}
168182
}

0 commit comments

Comments
 (0)