go-panton / mcre

Panton Multi-Content Repository Service (Panton MCRE), provides developers and IT teams with secure, durable, highly-scalable cloud storage.
0 stars 0 forks source link

issues on reliability (error/recovery) #13

Open roylee0704 opened 8 years ago

roylee0704 commented 8 years ago
roylee0704 commented 8 years ago

https://developers.google.com/drive/v3/web/handle-errors#errors_and_suggested_actions

roylee0704 commented 8 years ago

download

roylee0704 commented 8 years ago

https://developer.mozilla.org/en-US/docs/Web/HTTP/Response_codes

roylee0704 commented 8 years ago

https://parse.com/docs/rest/guide#errors

roylee0704 commented 8 years ago

http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

roylee0704 commented 8 years ago

From micro-service point of view, there are possibly at least 3 places to screw up:

Find out how to deal with errors at each of the point.

roylee0704 commented 8 years ago

server should not send error code: 1xx http://www.websitepulse.com/kb/1xx_http_status_codes.html

roylee0704 commented 8 years ago

it's absolutely ok to make your own custom error status code as long as you respect its class: 1xx, 2xx, 4xx, 5xx. http://stackoverflow.com/questions/7996569/can-we-create-custom-http-status-codes

roylee0704 commented 8 years ago

question, do we need custom error status code?

roylee0704 commented 8 years ago

if we go according with google-drive-api, they will try not to use any custom status code,

https://developers.google.com/drive/v3/web/handle-errors#403_the_user_does_not_have_sufficient_permissions_for_file_fileid

instead, they will customize the message according to the context of error.

roylee0704 commented 8 years ago

see how google test http error.

https://github.com/google/google-api-go-client/blob/f70ad682fde08f28c80f8e7a5cf17c21244ddaaa/googleapi/googleapi_test.go