local-server/cmd/dkl-local-server/httperr.go

17 lines
469 B
Go
Raw Normal View History

2023-02-12 10:58:26 +00:00
package main
import (
"net/http"
"m.cluseau.fr/go/httperr"
)
2023-02-13 12:03:42 +00:00
var (
2023-05-01 14:33:56 +00:00
ErrNotFound = httperr.NotFound
2023-02-13 16:24:28 +00:00
ErrUnauthorized = httperr.StdStatus(http.StatusUnauthorized)
ErrForbidden = httperr.StdStatus(http.StatusForbidden)
2023-05-18 17:55:52 +00:00
ErrInternal = httperr.StdStatus(http.StatusInternalServerError)
2023-02-13 16:24:28 +00:00
ErrInvalidToken = httperr.NewStd(1000, http.StatusForbidden, "invalid token")
2023-05-18 17:55:52 +00:00
ErrStoreLocked = httperr.NewStd(1001, http.StatusServiceUnavailable, "store is locked")
2023-02-13 12:03:42 +00:00
)