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

Add JSON message when raising Error's #39

@allcentury

Description

@allcentury

As show in issue #38 when a 409 is received from provisioning a user, we currently raise a Validic::Errors::Conflict which is the correct behavior but we do not currently pass through the body of the message which has valuable context.

In this example, the body would be:

{
  "code": 409,
  "message": "Your organization is limited to 25 users"
}

I would think the error would be raised as:

raise Conflict, "Your organization is limited to 25 users"

Where that string is coming from the response body's 'message' key.

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