Open kruhmann opened 6 months ago
Hi,
I tried to get information for a template without having enroll permission. In this case a 500 server error is returned. It seems that the Forbid method (https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.forbid?view=aspnetcore-8.0) expects an authentication scheme and does not accept an error message (without special handling).
Maybe it is possible to switch the response to Unauthorized. Then the RestAPI remains clean and simple.
Kind regards Konstantin
Hi,
I tried to get information for a template without having enroll permission. In this case a 500 server error is returned. It seems that the Forbid method (https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.forbid?view=aspnetcore-8.0) expects an authentication scheme and does not accept an error message (without special handling).
Maybe it is possible to switch the response to Unauthorized. Then the RestAPI remains clean and simple.
Kind regards Konstantin