Updating
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
namespace LCU.Api.Internal.ArchiverApi.Exceptions;
|
||||
|
||||
public class FailedToParseException : Exception
|
||||
{
|
||||
public FailedToParseException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
namespace LCU.Api.Internal.ArchiverApi.Exceptions;
|
||||
|
||||
/**
|
||||
* If an entity cannot be found, that specific error can allow for a 404 or 400 with more detail to be
|
||||
* returned. So specify that to the API layer.
|
||||
*/
|
||||
public class NotFoundException : ApplicationException
|
||||
{
|
||||
public NotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
namespace LCU.Api.Internal.ArchiverApi.Exceptions;
|
||||
|
||||
/**
|
||||
* Do not want to expose database and related exceptions to the controllers / web layer.
|
||||
* The lower layers log what happened for developers, then return a general error; unless
|
||||
* a more specific error can be returned in a way to allow the client to act (such as NotFound).
|
||||
*/
|
||||
public class ServerErrorException : Exception
|
||||
{
|
||||
public ServerErrorException() : base("A server error occured, and a response could not be produced.") { }
|
||||
}
|
||||
Reference in New Issue
Block a user