ethersphere/gateway-proxy

App crashes when ContentManager reupload/reupload check fails

Cafe137 opened this issue · 0 comments

The stamp manager handles this gracefully, and starts/continues working properly once Bee is back up, and another iteration of the stamp manager interval runs.

BeeResponseError: Not Found: Not Found
    at /Users/aron/Code/gateway-proxy/node_modules/@ethersphere/bee-js/dist/cjs/utils/http.js:147:27
    at Generator.next (<anonymous>)
    at fulfilled (/Users/aron/Code/gateway-proxy/node_modules/@ethersphere/bee-js/dist/cjs/utils/http.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  status: 404,
  response: Response {
    size: 0,
    [Symbol(Body internals)]: { body: [Gunzip], boundary: null, disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'http://localhost:1635/pins',
      status: 404,
      statusText: 'Not Found',
      headers: [Headers],
      counter: 0,
      highWaterMark: 10000000
    }
  },
  responseBody: '{"message":"Not Found","code":404}\n\n',
  requestOptions: { method: 'get', responseType: 'json', path: 'pins' }
}
[nodemon] app crashed - waiting for file changes before starting...

We are missing a catch, which logs the error instead of making the error unhandled and crashing the app