Chore: Add errutils helpers (#73577)

Add helpers for the errutil package in favor of errutil.NewBase.
This commit is contained in:
Marcus Efraimsson
2023-08-22 12:52:24 +02:00
committed by GitHub
parent 1cc226e689
commit 040b7d2571
45 changed files with 261 additions and 161 deletions
+3 -3
View File
@@ -15,9 +15,9 @@ var (
// same error message for the frontend statically within the
// package.
errAbsPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.absolutePath")
errInvalidPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.invalidPath")
errUnexpected = errutil.NewBase(errutil.StatusInternal, "shorturl.unexpected")
errAbsPath = errutil.BadRequest("shorturl.absolutePath")
errInvalidPath = errutil.BadRequest("shorturl.invalidPath")
errUnexpected = errutil.Internal("shorturl.unexpected")
)
func Example() {