Skip to content

Casing error objects #510

Open
Open
@anthonator

Description

@anthonator

Currently, when you provide a map as part of an error payload the map keys don't get cased.

For instance, when providing the following payload as part of Absinthe.Resolution's error result:

%{
  message: :unprocessable_entity,
  details: %{
    user_email: %{ validation: "required" }
  }
}

I get back the following JSON object:

{
  "message": "unprocessable_entity",
  "details": {
    "user_email": { "validation": "required" }
  }
}

Ideally, the result would be cased the same way "successful" results are. Like so:

{
  "message": "unprocessable_entity",
  "details": {
    "userEmail": { "validation": "required" }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions