HTTPStatus is the HTTP status a request error carries, or 0 when the request got no answer at all (the server was unreachable) or the error did not come from an HTTP answer.
(err error)
| 3968 | // request got no answer at all (the server was unreachable) or the error did |
| 3969 | // not come from an HTTP answer. |
| 3970 | func HTTPStatus(err error) int { |
| 3971 | var apiErr *APIError |
| 3972 | if errors.As(err, &apiErr) { |
| 3973 | return apiErr.Status |
| 3974 | } |
| 3975 | var statusErr *StatusError |
| 3976 | if errors.As(err, &statusErr) { |
| 3977 | return statusErr.Status |
| 3978 | } |
| 3979 | return 0 |
| 3980 | } |
| 3981 | |
| 3982 | // --- Item reminders (IDEA-2641) --- |
| 3983 |
no outgoing calls