# `AshJsonApi.Error.InvalidSort`
[🔗](https://github.com/ash-project/ash_json_api/blob/v1.6.5/lib/ash_json_api/error/invalid_sort.ex#L5)

Returned when a sort parameter is invalid or malformed

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %AshJsonApi.Error.InvalidSort{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  detail: term(),
  field: term(),
  path: term(),
  sort: term(),
  source_parameter: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.AshJsonApi.Error.InvalidSort` without raising it.

## Keys

- :sort
- :field
- :detail
- :source_parameter

---

*Consult [api-reference.md](api-reference.md) for complete listing*
