handle error statuscodes