FIX: Uploading File With Unkown Catagory Id
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m22s
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m22s
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package handlers
|
||||
|
||||
import "errors"
|
||||
|
||||
// Sentinel errors the handlers branch on with errors.Is to decide which
|
||||
// problem response a failure deserves. They exist to separate a client's
|
||||
// mistake from a server fault where the code that detects both is the same
|
||||
// code — the repositories return plain errors, so without these every failure
|
||||
// out of a lookup would have to be answered as a 500.
|
||||
|
||||
// errUnknownCatagoryID reports that a submitted category id is not in the
|
||||
// category table. It is kept distinct from the error the lookup itself
|
||||
// returns because the two are not the same kind of failure: an id nobody has
|
||||
// is the client's mistake and answers 404, while a lookup that could not run
|
||||
// is the server's and answers 500.
|
||||
var errUnknownCatagoryID = errors.New("unknown catagory id")
|
||||
Reference in New Issue
Block a user