Skip to content

Bad signature value triggers uncaught exception #5

@karpet

Description

@karpet

If you POST a signature value that is not a valid base64-encoded image string, you must wait for the server to timeout (30s) and this error is thrown:

Serverless: ANY /vr/en (λ: hello)
{ Error: Command failed: convert: improper image header /tmp/signature.png' @ error/png.c/ReadPNGImage/4232. convert: no images defined /tmp/signature.png' @ error/convert.c/ConvertImageCommand/3275.

at ChildProcess.onExit (/Users/karpet/work/ksvotes.org/NVRIS/node_modules/gm/lib/command.js:301:17)
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:442:20)
at maybeClose (internal/child_process.js:957:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5) code: 1, signal: null }

(node:66136) UnhandledPromiseRejectionWarning: Error: Command failed: convert: improper image header /tmp/signature.png' @ error/png.c/ReadPNGImage/4232. convert: no images defined /tmp/signature.png' @ error/convert.c/ConvertImageCommand/3275.

at ChildProcess.onExit (/Users/karpet/work/ksvotes.org/NVRIS/node_modules/gm/lib/command.js:301:17)
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:442:20)
at maybeClose (internal/child_process.js:957:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)

(node:66136) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 17)
Serverless: Replying timeout after 30000ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions