toAdminAPIErrCode - converts errErasureWriteQuorum error to admin API specific error.
(ctx context.Context, err error)
| 220 | // toAdminAPIErrCode - converts errErasureWriteQuorum error to admin API |
| 221 | // specific error. |
| 222 | func toAdminAPIErrCode(ctx context.Context, err error) APIErrorCode { |
| 223 | switch err { |
| 224 | case errErasureWriteQuorum: |
| 225 | return ErrAdminConfigNoQuorum |
| 226 | default: |
| 227 | return toAPIErrorCode(ctx, err) |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | // wraps export error for more context |
| 232 | func exportError(ctx context.Context, err error, fname, entity string) APIError { |