Skip to content

Latest commit

 

History

History
39 lines (20 loc) · 1.48 KB

0.1-response-codes.md

File metadata and controls

39 lines (20 loc) · 1.48 KB

Response Codes

The EWP defines various response codes inspired by HTTP Status codes.

200 Ok

This response code is considered the default code. It is returned when the request could be answered as is expected.

400 Bad Request

This response code is returned when the message is malformed e.g. does not contain the required fields.

403 Forbidden

This response code is returned when the caller is not allowed to access specific data.

404 Not Found

This response code is returned when a lookup or similar function against a node returned empty results.

406 Request Compression Unsupported

This response code is returned when the chosen request compression codec is unsupported by the server.

407 Response Compression Unsupported

This response code is returned when none of the requested response compression preferences are supported.

418 Not a Blockchain

This response code is returned when the node software refuses to cooperate because it is not actually a blockchain.

500 Internal Server Error

This response code is returned when a node experiences some form of internal error that causes it to fail handling the request as expected.

501 Not Implemented

This response code is returned when the node does not support the functionality required to fulfill the request. This is the appropriate response when the node does not recognize the request command and is not capable of supporting it.