Skip to content

Commit

Permalink
Pass response status from Chrly to the final response
Browse files Browse the repository at this point in the history
  • Loading branch information
erickskrauch committed Dec 21, 2023
1 parent 9cad666 commit e84e39e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ func main() {
return
}

if profileResp.StatusCode != http.StatusOK && profileResp.StatusCode != http.StatusNoContent {
// TODO: log response
response.WriteHeader(500)
return
}

response.Header().Set("Content-Type", "application/json")
response.WriteHeader(profileResp.StatusCode)

_, err = io.Copy(response, profileResp.Body)
if err != nil {
Expand Down

0 comments on commit e84e39e

Please sign in to comment.