debug = false not worked as expected
If you try to disable debug mode to not show code or more details on-screen when you got an error 500, the .env
APP_DEBUG=false
or instruction
app()->config('debug',false)
will not prevent the nice debug screen to show up.

Code
app()->config(['debug' => false]);
will not work either.
If you set debug to false in _app.php, for example, and var_dump the variable, you will get false. But if you try to var_dump the variable inside App.php class, you will get true:

/Users/julian/uc-api/vendor/leafs/leaf/src/App.php:73:boolean true
It seems the "debug" variable is not controlled by the Config::static:$settings array, but from within the /config/app.php script:

But still if you define the variable afterwards, in _app.php script, it will not work:
Leaf\Config::set([
"views.path" => "views",
"views.cachePath" => "views/cache",
'log.style' => 'linux',
'log.enabled' => true,
'log.dir' => __DIR__ . '/../../storage/logs/',
'log.file' => 'uc-api-'.date('Y-m-d').'.log',
'debug' => false,
]);
I'll take a look at this
@swimitup This has been fixed in Leaf's new release. You can run composer update in your project to get rid of this error.