Skip to content

Commit

Permalink
New error "Rate Limit Exceeded"
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainVialard authored Apr 23, 2018
1 parent 12b9e3e commit 0ada882
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ErrorHandler.gs.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ NORMALIZED_ERRORS = {
EMPTY_RESPONSE: "Empty response",
LIMIT_EXCEEDED: "Limit Exceeded: .",
USER_RATE_LIMIT_EXCEEDED: "User Rate Limit Exceeded",
RATE_LIMIT_EXCEEDED: "Rate Limit Exceeded",
NOT_FOUND: "Not Found",
BACKEND_ERROR: "Backend Error",
SERVICE_INVOKED_TOO_MANY_TIMES_EMAIL: "Service invoked too many times for one day: email.",
Expand Down Expand Up @@ -561,9 +562,12 @@ ErrorHandler_._ERROR_MESSAGE_TRANSLATIONS = {
"Límite excedido: .": { ref: NORMALIZED_ERRORS.LIMIT_EXCEEDED, locale: 'es'},
"Limite dépassée : .": { ref: NORMALIZED_ERRORS.LIMIT_EXCEEDED, locale: 'fr'},

// User Rate Limit Exceeded
// "User Rate Limit Exceeded" - eg: Gmail.Users.Threads.get
"User Rate Limit Exceeded": { ref: NORMALIZED_ERRORS.USER_RATE_LIMIT_EXCEEDED, locale: 'en'},

// "Rate Limit Exceeded" - eg: Gmail.Users.Messages.send
"Rate Limit Exceeded": { ref: NORMALIZED_ERRORS.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'},
Expand Down

0 comments on commit 0ada882

Please sign in to comment.