Skip to content

Errors are only dispatched after a request is finished. #2825

@lintuxt

Description

@lintuxt

I've been developing an API to upload files and found this issue.

If I have this configuration:

 method: 'POST',
    path: '/upload',
    handler: POSTHandlers.upload,
    config: {
        payload: {
            output: 'data',
            parse: true,
            allow: ["multipart/form-data"],
            maxBytes: 1024,
            timeout: X
        }
    }

and I upload a file of 200 megabytes. The 40x error will be triggered only after the whole stream of data has been transferred.

Timeout also is not working.

What am I doing wrong?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions