Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Return appropriate error code for invalid type in model object #32

Closed

Description

@itsjoeconway

Trying to assign a String to an int throws an exception that returns a 500, but this should be intercepted and turned into a 400.

Expected: Status Code: 400
Actual: <Instance of 'Response'>
Which: Response Body: {"error":"invalid input syntax for integer: "foo""}, Status Code Is Actually: 500

Activity

  1. itsjoeconway commented on Jan 7, 2016

    @itsjoeconway
    ContributorAuthor

    Additionally, supplying an int for a String simply encodes the int as a String - this may or may not be desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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