Skip to content

Commit

Permalink
report status code errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rystaf committed Oct 22, 2023
1 parent 42a124c commit 4f54e34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/integration/rssbridge/rssbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func DetectBridges(rssbridgeURL, websiteURL string) (bridgeResponse []Bridge, er
if response.StatusCode == http.StatusNotFound {
return
}
if response.StatusCode > 400 {
return nil, fmt.Errorf("RSS-Bridge: server failure (%d)", response.StatusCode)
}
if err := json.NewDecoder(response.Body).Decode(&bridgeResponse); err != nil {
return nil, fmt.Errorf("RSS-Bridge: unable to decode bridge response: %w", err)
}
Expand Down

0 comments on commit 4f54e34

Please sign in to comment.