This commit is contained in:
@@ -98,7 +98,7 @@ func (c client) request(ctx context.Context, method, path string, body any, out
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||
return errors.New("acceptance request denied")
|
||||
return fmt.Errorf("acceptance request denied with status %d", resp.StatusCode)
|
||||
}
|
||||
if out != nil && json.NewDecoder(io.LimitReader(resp.Body, 1<<20)).Decode(out) != nil {
|
||||
return errors.New("invalid acceptance response")
|
||||
|
||||
Reference in New Issue
Block a user