mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 22:38:20 +01:00
17 lines
713 B
Go
17 lines
713 B
Go
package api_schema
|
|
|
|
var (
|
|
ErrBadRequest = NewAPIError(400, "Bad request")
|
|
ErrInvalidRequestBody = NewAPIError(400, "Invalid request body")
|
|
ErrUnauthorized = NewAPIError(401, "Unauthorized")
|
|
ErrForbidden = NewAPIError(403, "Forbidden")
|
|
ErrNotFound = NewAPIError(404, "Not found")
|
|
ErrUserNotFound = ErrNotFound(map[string]any{"reason": "user not found"})
|
|
ErrConflict = NewAPIError(409, "Conflict")
|
|
ErrUsernameTaken = NewAPIError(409, "Username is taken")
|
|
ErrRateLimitExceeded = NewAPIError(429, "Rate limit exceeded")
|
|
|
|
ErrInternalServerError = NewAPIError(500, "Internal server error")
|
|
ErrNotImplemented = NewAPIError(501, "Not implemented")
|
|
)
|