2023-10-11

Error & Err<T>

To (eventually) avoid leaking .NET abstraction through the API (for example by the SemanticExceptionFilter), we use the Error and Err<T>. Err<T> can be either T or one or more Errors. These are then passed out of a method through its return value. This forces the caller to deal with the errors that can occur or pass them upwards. The API should send then the error(s) along with the proper http code. Eventually we should to remove the SemanticExceptionFilter and treat all exceptions as internal server errors (500).