You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, no worries at all. So as the documentation states, these are methods on the Server instance. So you would do something like this:
import{Server}from'hyper-express';constserver=newServer();server.set_not_found_handler((request,response)=>{// Send a not found response for any requests that are not handled by any routeresponse.status(404).send('Not Found');});server.set_error_handler((request,response,error)=>{console.log(error);// Send some sort of a responseresponse.status(500).send('Server Error Occured. Please try again later.');});
The text was updated successfully, but these errors were encountered: