Handling non-200 code