2018-05-27 22:40:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var errorMalformedTemplate = errors.New("A template is malformed.")
|
|
|
|
var errorMissingConfig = errors.New("Missing config environment variable.")
|
|
|
|
var errorCannotSendEmail = errors.New("Email dispatch failed. Please contact support to resolve this issue.")
|
|
|
|
var errorInternal = errors.New("An internal error has occurred. If you see this repeatedly, please contact support.")
|
|
|
|
var errorInvalidJSONBody = errors.New("Invalid JSON request. If you think this shouldn't happen, please contact support.")
|
|
|
|
var errorMissingField = errors.New("One or more field(s) empty.")
|
|
|
|
var errorEmailExists = errors.New("That email address is already registered. Sign in instead?")
|
|
|
|
var errorInvalidEmailPassword = errors.New("Invalid email/password combination.")
|
|
|
|
var errorUnconfirmedEmail = errors.New("Your email address is still unconfirmed. Please confirm your email address before proceeding.")
|
|
|
|
var errorNoSuchConfirmationToken = errors.New("This email confirmation link has expired.")
|
|
|
|
var errorNoSuchResetToken = errors.New("This password reset link has expired.")
|
|
|
|
var errorNotAuthorised = errors.New("You're not authorised to access that.")
|
|
|
|
var errorEmailAlreadyExists = errors.New("That email address has already been registered.")
|
|
|
|
var errorNoSuchSession = errors.New("No such session/state.")
|
2018-06-07 00:51:31 +08:00
|
|
|
var errorNoSuchCommenter = errors.New("No such commenter.")
|
2018-05-27 22:40:42 +08:00
|
|
|
var errorAlreadyUpvoted = errors.New("You have already upvoted that comment.")
|
|
|
|
var errorNoSuchDomain = errors.New("This domain is not registered with Commento.")
|
|
|
|
var errorNoSuchComment = errors.New("No such comment.")
|
|
|
|
var errorNeedPro = errors.New("You need to have a pro/business account to do that.")
|
|
|
|
var errorInvalidState = errors.New("Invalid state value.")
|
|
|
|
var errorInvalidTrial = errors.New("Invalid trial value.")
|
|
|
|
var errorDomainFrozen = errors.New("Cannot add a new comment because that domain is frozen.")
|
|
|
|
var errorDomainAlreadyExists = errors.New("That domain has already been registered. Please contact support if you are the true owner.")
|
|
|
|
var errorUnauthorisedVote = errors.New("You need to be authenticated to vote.")
|
|
|
|
var errorNoSuchEmail = errors.New("No such email.")
|
|
|
|
var errorInvalidEmail = errors.New("You do not have an email registered with that account.")
|
|
|
|
var errorNoTrialChange = errors.New("You cannot change to a trial plan.")
|
|
|
|
var errorInvalidPlan = errors.New("Invalid plan value.")
|
|
|
|
var errorNoSource = errors.New("You have no payment source on record to change your plan.")
|
|
|
|
var errorCannotDowngrage = errors.New("Cannot downgrade plan features.")
|
|
|
|
var errorForbiddenEdit = errors.New("You cannot edit someone else's comment.")
|
|
|
|
var errorNotInvited = errors.New("Commento is currently in private beta and invite-only for now.")
|
|
|
|
var errorMissingSmtpAddress = errors.New("Missing SMTP_FROM_ADDRESS")
|
|
|
|
var errorSmtpNotConfigured = errors.New("SMTP is not configured.")
|
|
|
|
var errorOauthMisconfigured = errors.New("OAuth is misconfigured.")
|
|
|
|
var errorUnassociatedSession = errors.New("No user associated with that session.")
|
|
|
|
var errorSessionAlreadyInUse = errors.New("Session is already in use.")
|
|
|
|
var errorCannotReadResponse = errors.New("Cannot read response.")
|
|
|
|
var errorNotModerator = errors.New("You need to be a moderator to do that.")
|