localsettings and catch api error