ethersphere/gateway-proxy

Improve error when uploading fails due to no available postage stamp

agazso opened this issue · 1 comments

Currently on gateway-watch we get a status: 503; response: [object Response]; responseBody: Service Unavailable; requestOptions: [object Object]; message: Service Unavailable errors when there are no valid postage stamps to be used for uploading.

It would be better to have a more meaningful response:

  • It could use a different error code (for example 402 Payment Required)
  • It could tell in the error message what is the problem

Maybe this is an issue with the gateway-watch or the nginx config, but I wanted to document to problem somewhere.

This error was swallowed before, now it is 402 with message No postage stamp

Will do its gateway-watch counterpart after release https://github.com/ethersphere/gateway-watch/issues/18