Skip to content

Commit

Permalink
Added additional errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainVialard authored Apr 23, 2018
1 parent 857fde5 commit 263f37e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ErrorHandler.gs.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ NORMALIZED_ERRORS = {
UNABLE_TO_TALK_TO_TRIGGER_SERVICE: "Unable to talk to trigger service",
MAIL_SERVICE_NOT_ENABLED: "Mail service not enabled",
INVALID_THREAD_ID_VALUE: "Invalid thread_id value",
LABEL_ID_NOT_FOUND: "labelId not found",
LABEL_NAME_EXISTS_OR_CONFLICTS: "Label name exists or conflicts",

// Partial match error
INVALID_EMAIL: 'Invalid email',
Expand Down Expand Up @@ -563,7 +565,10 @@ ErrorHandler_._ERROR_MESSAGE_TRANSLATIONS = {
"User Rate Limit Exceeded": { ref: NORMALIZED_ERRORS.USER_RATE_LIMIT_EXCEEDED, locale: 'en'},

// "Not Found"
// with uppercase "f" when calling Gmail.Users.Messages or Gmail.Users.Drafts endpoints
"Not Found": { ref: NORMALIZED_ERRORS.NOT_FOUND, locale: 'en'},
// with lowercase "f" when calling Gmail.Users.Threads endpoint
"Not found": { ref: NORMALIZED_ERRORS.NOT_FOUND, locale: 'en'},

// "Backend Error"
"Backend Error": { ref: NORMALIZED_ERRORS.BACKEND_ERROR, locale: 'en'},
Expand All @@ -587,6 +592,12 @@ ErrorHandler_._ERROR_MESSAGE_TRANSLATIONS = {

// "Invalid thread_id value"
"Invalid thread_id value": { ref: NORMALIZED_ERRORS.INVALID_THREAD_ID_VALUE, locale: 'en'},

// "labelId not found"
"labelId not found": { ref: NORMALIZED_ERRORS.LABEL_ID_NOT_FOUND, locale: 'en'},

// "Label name exists or conflicts"
"Label name exists or conflicts": { ref: NORMALIZED_ERRORS.LABEL_NAME_EXISTS_OR_CONFLICTS, locale: 'en'},
};

/**
Expand Down

0 comments on commit 263f37e

Please sign in to comment.