fix(errors): add handler for errors