Is there a way to check when errors occur?