Docs of on_error behaviour