Skip to content

fastify response schema validation throws error #529

@jithinktom

Description

@jithinktom

When my response does not match with the schema defined, it throws an error and breaks the application. I want a solution to log this as an error/warning, instead of breaking the application.

image

As you can see in the image, relatedKeywords is type array. But from my code, for some reason, it was populated as object. I get this error then:
Screenshot 2021-09-15 at 9 35 08 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions