Check status code before showing errors.