common service errors
This commit is contained in:
parent
8c254aef6e
commit
8f74a3f783
@ -2,10 +2,18 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"git.itzana.me/strafesnet/maps-service/pkg/api"
|
"git.itzana.me/strafesnet/maps-service/pkg/api"
|
||||||
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
|
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// ErrPermissionDenied caller does not have the required role
|
||||||
|
ErrPermissionDenied = errors.New("Permission denied")
|
||||||
|
// ErrUserInfo user info is missing for some reason
|
||||||
|
ErrUserInfo = errors.New("Missing user info")
|
||||||
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
DB datastore.Datastore
|
DB datastore.Datastore
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,6 @@ import (
|
|||||||
var (
|
var (
|
||||||
// ErrInvalidSourceStatus current submission status cannot change to destination status
|
// ErrInvalidSourceStatus current submission status cannot change to destination status
|
||||||
ErrInvalidSourceStatus = errors.New("Invalid source status")
|
ErrInvalidSourceStatus = errors.New("Invalid source status")
|
||||||
// ErrPermissionDenied caller does not have the required role
|
|
||||||
ErrPermissionDenied = errors.New("Permission denied")
|
|
||||||
// ErrUserInfo user info is missing for some reason
|
|
||||||
ErrUserInfo = errors.New("Missing user info")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// POST /submissions
|
// POST /submissions
|
||||||
|
Loading…
Reference in New Issue
Block a user