# Error handling Most errors will be handled by Kontrl and shown to the client. However sometimes something goes wrong that Kontrl just can't handle alone. You can decide yourself how you would like to handle these problems withthe onError function. ```js const kontrl = require("kontrl"); kontrl.onError((msg, context) => { // Handle your error here console.log("[Kontrl Error]: ", msg, context); }); ``` This allows you to choose your favourite way to handle errors.