Skip to content

Commit a12f834

Browse files
author
Erik Westrup
committed
Prototype
1 parent 048ece0 commit a12f834

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

go/porcelain/deploy.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,14 @@ func (n *Netlify) uploadFile(ctx context.Context, d *models.Deploy, f *FileBundl
538538
context.GetLogger(ctx).WithError(operationError).Errorf("Failed to upload file %v", f.Name)
539539
apiErr, ok := operationError.(apierrors.Error)
540540

541-
if ok && apiErr.Code() == 401 {
542-
sharedErr.mutex.Lock()
543-
sharedErr.err = operationError
544-
sharedErr.mutex.Unlock()
541+
if ok {
542+
if apiErr.Code() == 401 {
543+
sharedErr.mutex.Lock()
544+
sharedErr.err = operationError
545+
sharedErr.mutex.Unlock()
546+
} else if apiErr.Code()/100 == 4 {
547+
return nil
548+
}
545549
}
546550
}
547551

0 commit comments

Comments
 (0)