mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
functions: returns HTTP error in case of route update attempt (#396)
Ensure that attempts to update route's path are properly handled with a HTTP error. Moreover, updates swagger file to make it explicit that routes are immutable. Fixes #381
This commit is contained in:
@@ -15,15 +15,16 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrInvalidPayload = errors.New("Invalid payload")
|
||||
ErrRoutesAlreadyExists = errors.New("Route already exists")
|
||||
ErrRoutesCreate = errors.New("Could not create route")
|
||||
ErrRoutesUpdate = errors.New("Could not update route")
|
||||
ErrRoutesRemoving = errors.New("Could not remove route from datastore")
|
||||
ErrRoutesGet = errors.New("Could not get route from datastore")
|
||||
ErrRoutesList = errors.New("Could not list routes from datastore")
|
||||
ErrRoutesAlreadyExists = errors.New("Route already exists")
|
||||
ErrRoutesNotFound = errors.New("Route not found")
|
||||
ErrRoutesMissingNew = errors.New("Missing new route")
|
||||
ErrInvalidPayload = errors.New("Invalid payload")
|
||||
ErrRoutesNotFound = errors.New("Route not found")
|
||||
ErrRoutesPathImmutable = errors.New("Could not update route - path is immutable")
|
||||
ErrRoutesRemoving = errors.New("Could not remove route from datastore")
|
||||
ErrRoutesUpdate = errors.New("Could not update route")
|
||||
)
|
||||
|
||||
type Routes []*Route
|
||||
|
||||
Reference in New Issue
Block a user