Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FileTooLarge means that the uploaded file is too large to process FileTooLarge ErrCode = 20 // InvalidDimensions means that the dimensions of an invalid are not valid InvalidDimensions = 21 // MetadataNotPresent means an attachment with non-existent file metadata MetadataNotPresent = 22 // AttachmentItemNotFound means an attachment on an item that does not exist AttachmentItemNotFound = 23 )
HTTP 413 Request Entity Too Large
View Source
const (
// SearchTimeout means that the search has timed out
SearchTimeout = 24
)
HTTP 500 Internal Server Error
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrCode ¶
type ErrCode uint8
ErrCode is a uint8
const ( // BadContentType means that the content-type is not accepted (e.g. text/xml) BadContentType ErrCode = 1 // InvalidContent means that the content does not match Content-Type InvalidContent ErrCode = 2 // UnexpectedType means a parameter was not of the expected type UnexpectedType ErrCode = 3 // OutOfRange means a parameter was outside the expected range OutOfRange ErrCode = 4 // Closed means that the event is closed. Closed ErrCode = 17 // EventRSVPFull means that the event is full EventRSVPFull ErrCode = 18 // EventRSVPExpired means that the event has expired EventRSVPExpired ErrCode = 19 )
HTTP 400 Bad Request
const ( // ExpiredToken means a token has expired ExpiredToken ErrCode = 6 // InvalidToken means a token is no longer (or was never) valid InvalidToken ErrCode = 7 // NotAdmin means a given action requires administrator privileges NotAdmin ErrCode = 8 // NoRead means one does not have read permissions NoRead ErrCode = 9 // NoCreate means one does not have create permissions NoCreate ErrCode = 10 // NoUpdate means one does not have update permissions NoUpdate ErrCode = 11 // NoDelete means one does not have delete permissions NoDelete ErrCode = 12 // UserBanned means that user has been banned UserBanned ErrCode = 13 )
HTTP 403 Forbidden
const ( // SiteNotFound means that the site is not found SiteNotFound ErrCode = 14 // Deleted means that the item has been deleted Deleted ErrCode = 15 )
HTTP 404 Not Found
const ( // ExceededQuota means that the client has exceeded the rate limiting quota ExceededQuota ErrCode = 16 )
HTTP 429 Too Many Requests
const ( // LoginRequired means an action not permitted for guests LoginRequired ErrCode = 5 )
HTTP 401 Unauthorized
type MicrocosmError ¶
type MicrocosmError struct { SiteID int64 `json:"siteId"` ProfileID int64 `json:"profileId,omitempty"` Function string `json:"-"` ErrorCode ErrCode `json:"errorCode"` ErrorMessage string `json:"errorDetail"` }
MicrocosmError implements the Error interface.
func (MicrocosmError) Error ¶
func (e MicrocosmError) Error() string
Error returns a string of the error message
Click to show internal directories.
Click to hide internal directories.