better error handling with customized http status codes when running api routes on the server. thx @mweibel for making it a topic :)