chore: add 500 status
This commit is contained in:
parent
8ae61d4a27
commit
7ab409403f
@ -122,7 +122,7 @@ func (f *httpFetcher) Fetch(ctx context.Context, request *Feed) *Response {
|
|||||||
f.m_fetch_status.Add(ctx, 1, metric.WithAttributes(attribute.String("status", "not_modified")))
|
f.m_fetch_status.Add(ctx, 1, metric.WithAttributes(attribute.String("status", "not_modified")))
|
||||||
response.err = fmt.Errorf("%w: %s", ErrUnmodified, res.Status)
|
response.err = fmt.Errorf("%w: %s", ErrUnmodified, res.Status)
|
||||||
|
|
||||||
case 400, 406, 429, 502, 503:
|
case 400, 406, 429, 500, 502, 503:
|
||||||
f.m_fetch_status.Add(ctx, 1, metric.WithAttributes(attribute.String("status", "temp_fail")))
|
f.m_fetch_status.Add(ctx, 1, metric.WithAttributes(attribute.String("status", "temp_fail")))
|
||||||
response.err = fmt.Errorf("%w: %s", ErrTemporarilyDead, res.Status)
|
response.err = fmt.Errorf("%w: %s", ErrTemporarilyDead, res.Status)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user