How to debug the Whook's `E_NOT_FOUND` error?

Viewed 58

I have the E_NOT_FOUND error but can't manage to fix it.

1 Answers

The E_NOT_FOUND error means the router could not find any declared route in the API definition you provided.

Several possibilities :

  • the route simply doesn't exists (easy to fix: create it if needed)
  • the handler definition is not declared in the API service : per default handlers definitions are automatically loaded by the API_DEFINITIONS service, you can get some informations on what it does by running your server with debug traces: DEBUG=whook npm run dev
  • the router cannot match the route for some reasons: you can inspect how the siso router tries to match you request with its registered paths by running DEBUG=siso npm run dev
  • finally, you can get an overview of the final API declaration by printing your Open API declaration : npx whook inspect --name="API" --pretty
Related