Skip to content

Add tighter logic around HTTP Status Codes #5

@panicpanicpanic

Description

@panicpanicpanic

Right now this logic below determines if the response was successful, which isn't ideal:

	statusCode = response.StatusCode
	responseString := string(body)

	if statusCode > 207 {
		return body, fmt.Errorf("Uh oh! You've received a %d status code. Error: %s", statusCode, responseString)

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions