Skip to content

Review the 200 and 400 http error codes and make them configurable #4630

@natanasow

Description

@natanasow

Problem

When there is a consensus node error, for a wrong nonce, or similar, we are raising 400 instead of 200, which is the de facto standard (there is no standard for this).

We need to check which functional errors are generating 400 vs 200, compare them with Alchemy/QuickNode, and make the HTTP code configurable to allow relay providers to choose to be a de facto or no de facto standard.

Solution

  • list all errors
  • add a config var for selected HTTP code
  • return the HTTP code (200 or 400) based on the config var

Alternatives

No response

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions