Closed martinlehoux closed 4 years ago
Yes, this is intended. Mounted applications stay independent from the parent. For example, plugins installed to the parent are also not applied to routes of the mounted child application. The same is (should be*) true for error handlers or other configuration.
In Bottle 0.12, mount() actually calls the child application as if it were a wsgi callable. If you want errors to fall through, you can try disabling app.catchall
in the child application. I'm not entirely sure if that works, though. Would have to test it.
In Bottle 0.13+ mount() works differently for instances of bottle.Bottle
. Error handling is mixed up currently, if I see that right in the code. That needs to be fixed. Mounted applications should stay as independent as possible.
If you really want to share error handlers in both applications, than you can do that of cause: child.error_handler = parent.error_handler
This handles this error :
But if error is handled at app level, it doesn't work
Is this the desired behavior ? i.e. Errors occuring in a mounted app should only be handled in this mounted app