Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Service tracking issue for GSP-127: Add ServiceInternel and RequestThrottled Errors #7

Closed
1 task
Xuanwo opened this issue Jul 14, 2021 · 1 comment
Closed
1 task

Comments

@Xuanwo
Copy link
Contributor

Xuanwo commented Jul 14, 2021

This is the service tracking issue that generated by go-community, please close with comments if not applicable to this project.

Steps

  • Update formatError to add new errors check
@aeinrw
Copy link
Member

aeinrw commented Sep 9, 2021

This issues has been fixed!

go-service-minio/utils.go

Lines 150 to 164 in 8735b8c

switch e.Code {
case "AccessDenied":
return fmt.Errorf("%w, %v", services.ErrPermissionDenied, err)
case "NoSuchKey":
return fmt.Errorf("%w, %v", services.ErrObjectNotExist, err)
case "InternalError":
return fmt.Errorf("%w, %v", services.ErrServiceInternal, err)
}
switch e.StatusCode {
case http.StatusTooManyRequests:
return fmt.Errorf("%w, %v", services.ErrRequestThrottled, err)
case http.StatusServiceUnavailable:
return fmt.Errorf("%w, %v", services.ErrRequestThrottled, err)
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants