Servers: Core objects required. Includes creation. Bump version to 0.5.0.

This commit is contained in:
Paul
2021-06-01 17:09:31 +01:00
parent a4c1fee4cc
commit bff72fa6c3
23 changed files with 415 additions and 59 deletions

View File

@@ -35,6 +35,9 @@ pub enum Error {
AlreadyInGroup,
NotInGroup,
// ? Server related errors.
UnknownServer,
// ? General errors.
TooManyIds,
FailedValidation {
@@ -80,6 +83,8 @@ impl<'r> Responder<'r, 'static> for Error {
Error::AlreadyInGroup => Status::Conflict,
Error::NotInGroup => Status::NotFound,
Error::UnknownServer => Status::NotFound,
Error::FailedValidation { .. } => Status::UnprocessableEntity,
Error::DatabaseError { .. } => Status::InternalServerError,
Error::InternalError => Status::InternalServerError,