spec icon indicating copy to clipboard operation
spec copied to clipboard

Success/Error handling: Status Codes

Open matthewhudson opened this issue 12 years ago • 1 comments

Use three simple, common response codes indicating (1) success, (2) failure due to client-side problem, (3) failure due to server-side problem:

  • 200 - OK
  • 400 - Bad Request
  • 500 - Internal Server Error

matthewhudson avatar May 04 '13 19:05 matthewhudson

Sounds good to me (except for the inability to provide messages as you guys mentioned in your JSON-RPC thread).

https://github.com/elimisteve/block-status-code-retriever follows this suggestion. Example: https://github.com/elimisteve/block-status-code-retriever/blob/master/web.go#L58

elimisteve avatar Sep 04 '13 09:09 elimisteve