Description

HandleResponse logs the response details and exits the process with a status computed from the response status code. The mapping of response status code to exit status is as follows:

401: 1
402 to 500 (other than 403 and 404): 2
403: 3
404: 4
500+: 5