Skip to content

Conversation

yordis
Copy link

@yordis yordis commented May 22, 2024

Context

We had an issue today because we forgot to pattern match on {:error, code, body}

%CaseClauseError{
  term: {:error, 400, %{
    "message" => "filters: Unexpected token string(Card) expected ‘)’ at col 22", "status" => 400
  }}
}

This also matches:

- `{:error, error_code, response}`

I fixed the issue, but

file.ex:107:pattern_match
The pattern can never match the type.

Pattern:
{:error, __status, _body}

Type:
{:error, _}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant