 
     if not messageId or not (message = GmailApp.getMessageById messageId)
       Logger.log "Given message ID '%s' is not valid", messageId
-      throw ErrorCodes.INVALID_MESSAGE_ID
+      throw new Error ErrorCodes.INVALID_MESSAGE_ID,
+        email:      encodeURIComponent @getEmail()
+        messageId:  messageId
 
     now = new Date().getTime()
     matches = form.when?.match /^(delta|specified):([0-9]+)/


    unless props.how.star or props.how.unread or props.how.inbox
      Logger.log "No action specified"
      throw ErrorCodes.NO_ACTION


    stored = MailButler.storeButlerMail props
    throw ErrorCodes.STORE_FAILED unless stored

    thread = GmailApp.getThreadById message.getThread().getId()
    thread.moveToArchive() if String(form.archive) is "true"

    if ScriptApp.getScriptTriggers().length is 0
      Logger.log "Installing trigger"
      ScriptApp.newTrigger("process").timeBased().everyMinutes(MailButler.FREQUENCY_MINUTES).create()

    # Get a lock for the current user
    lock = LockService.getPrivateLock()
