Skip to content

Commit 5ad5c97

Browse files
authored
nil check response when comparing status code (#194)
1 parent a45982d commit 5ad5c97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

atmo/appsource/httpsource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (h *HTTPSource) FindRunnable(FQFN, auth string) (*directive.Runnable, error
101101
if resp, err := h.authedGet(path, auth, &runnable); err != nil {
102102
h.opts.Logger.Error(errors.Wrapf(err, "failed to get %s", path))
103103

104-
if resp.StatusCode == http.StatusUnauthorized {
104+
if resp != nil && resp.StatusCode == http.StatusUnauthorized {
105105
return nil, ErrAuthenticationFailed
106106
}
107107

0 commit comments

Comments
 (0)