Skip to content

[Erlang server] Crashing on JSON requests #7128

@velzevur

Description

@velzevur
Description

When processing application/json requests if the incoming json is invalid in any way - the request crashes.

Swagger-codegen version

master

Swagger declaration file content or url

If this jsx:decode call fails:

prepare_body(Body) ->
    case Body of
        <<"">> -> <<"">>;
        _ -> jsx:decode(Body, [return_maps])
    end.

the jsx throws an error. It is unhandled and crashes the request.

Related issues/PRs

PR fix is comming right after this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions