Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F12658815
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/errors/general.go b/errors/general.go
index 2320575..3a3b16b 100644
--- a/errors/general.go
+++ b/errors/general.go
@@ -1,29 +1,30 @@
package errors
import (
"github.com/writeas/impart"
"net/http"
)
var (
// Commonly returned HTTP errors
ErrBadFormData = impart.HTTPError{http.StatusBadRequest, "Expected valid form data."}
ErrBadJSON = impart.HTTPError{http.StatusBadRequest, "Expected valid JSON object."}
ErrBadJSONArray = impart.HTTPError{http.StatusBadRequest, "Expected valid JSON array."}
ErrBadAccessToken = impart.HTTPError{http.StatusUnauthorized, "Invalid access token."}
ErrNoAccessToken = impart.HTTPError{http.StatusBadRequest, "Authorization token required."}
ErrNotLoggedIn = impart.HTTPError{http.StatusUnauthorized, "Not logged in."}
ErrBadRequestedType = impart.HTTPError{http.StatusNotAcceptable, "Bad requested Content-Type."}
// Post operation errors
ErrPostNoUpdatableVals = impart.HTTPError{http.StatusBadRequest, "Supply some properties to update."}
ErrNoPublishableContent = impart.HTTPError{http.StatusBadRequest, "Supply something to publish."}
// Internal errors
ErrInternalGeneral = impart.HTTPError{http.StatusInternalServerError, "The humans messed something up. They've been notified."}
ErrInternalCookieSession = impart.HTTPError{http.StatusInternalServerError, "Could not get cookie session."}
// User errors
ErrUserNotFound = impart.HTTPError{http.StatusNotFound, "User doesn't exist."}
ErrUserNotFoundEmail = impart.HTTPError{http.StatusNotFound, "Please enter your username instead of your email address."}
+ ErrUsernameTaken = impart.HTTPError{http.StatusConflict, "Username is already taken."}
)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Dec 9, 12:37 PM (10 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3531173
Attached To
rWC Write.as Web Core
Event Timeline
Log In to Comment