Skip to content

[BUG] JSON parse error when wrong HTTP method used #115

@arddluma

Description

@arddluma

Describe the bug

When using /metadata endpoint using POST,PUT or other than GET request throws a weird JSON parse error

  "statusCode": 400,
  "error": "Bad Request",
  "message": "Unexpected token [ in JSON at position 15"
}

Expected behavior

Should show:
This HTTP method is not supported for this endpoint, please use GET (or POST depending on endpoint)

Steps to reproduce

Call https://arka.etherspot.io/metadata?apiKey={apikeyhere}&chainId=80002 using POST request

Additional context

No response

Operating system

macOS

Arka version or commit hash

1.2.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions