Found assignment of exceptions in catch clauses JS-0011
Bug risk
Major
3 months ago3 years old
Do not assign to the exception parameter
120    await next();
121  } catch (error) {
122    if (!(error instanceof APIError)) {
123      error = new APIError({ cause: error });124    }
125    ctx.status = error.statusCode;
126    ctx["api_error"] = error;