- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for toAPIErrorCode (0.53 sec)
-
cmd/bucket-object-lock.go
return mode, retainDate, legalHold, toAPIErrorCode(ctx, err) } } if retentionRequested { legalHold, err := objectlock.ParseObjectLockLegalHoldHeaders(rq.Header) if err != nil { return mode, retainDate, legalHold, toAPIErrorCode(ctx, err) } rMode, rDate, err := objectlock.ParseObjectLockRetentionHeaders(rq.Header)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 22 17:49:30 GMT 2024 - 13.2K bytes - Viewed (0) -
cmd/api-errors_test.go
} func TestAPIErrCode(t *testing.T) { ctx := context.Background() for i, testCase := range toAPIErrorTests { errCode := toAPIErrorCode(ctx, testCase.err) if errCode != testCase.errCode { t.Errorf("Test %d: Expected error code %d, got %d", i+1, testCase.errCode, errCode) } } } // Check if an API error is properly defined
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 25 15:13:08 GMT 2023 - 3.4K bytes - Viewed (0) -
cmd/auth-handler.go
if cred.IsTemp() && cred.IsExpired() { return nil, toAPIErrorCode(r.Context(), errInvalidAccessKeyID) } secret := globalActiveCred.SecretKey if globalSiteReplicationSys.isEnabled() && cred.AccessKey != siteReplicatorSvcAcc { nsecret, err := getTokenSigningKey() if err != nil { return nil, toAPIErrorCode(r.Context(), err) } // sign root's temporary accounts also with site replicator creds
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 26K bytes - Viewed (0) -
cmd/admin-handler-utils.go
// specific error. func toAdminAPIErrCode(ctx context.Context, err error) APIErrorCode { if errors.Is(err, errErasureWriteQuorum) { return ErrAdminConfigNoQuorum } return toAPIErrorCode(ctx, err) } // wraps export error for more context func exportError(ctx context.Context, err error, fname, entity string) APIError { if entity == "" {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Mar 01 21:09:42 GMT 2024 - 8.2K bytes - Viewed (0) -
cmd/admin-handlers_test.go
}, // 2. No error. { err: nil, expectedAPIErr: ErrNone, }, // 3. Non-admin API specific error. { err: errDiskNotFound, expectedAPIErr: toAPIErrorCode(GlobalContext, errDiskNotFound), }, } for i, test := range testCases { actualErr := toAdminAPIErrCode(GlobalContext, test.err) if actualErr != test.expectedAPIErr {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 13.8K bytes - Viewed (0) -
cmd/auth-handler_test.go
for i, testCase := range testCases { s3Error := isReqAuthenticated(ctx, testCase.req, globalSite.Region, serviceS3) if s3Error != testCase.s3Error { if _, err := io.ReadAll(testCase.req.Body); toAPIErrorCode(ctx, err) != testCase.s3Error { t.Fatalf("Test %d: Unexpected S3 error: want %d - got %d (got after reading request %s)", i, testCase.s3Error, s3Error, toAPIError(ctx, err).Code) } } } }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 15.4K bytes - Viewed (0) -
cmd/admin-handlers.go
return } nsLock := objectAPI.NewNSLock(minioMetaBucket, "site-net-perf") lkctx, err := nsLock.GetLock(ctx, globalOperationTimeout) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(toAPIErrorCode(ctx, err)), r.URL) return } ctx = lkctx.Context() defer nsLock.Unlock(lkctx) durationStr := r.Form.Get(peerRESTDuration) duration, err := time.ParseDuration(durationStr)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 29 17:39:04 GMT 2024 - 97.8K bytes - Viewed (2) -
cmd/api-errors.go
HTTPStatusCode: http.StatusBadRequest, }, } // toAPIErrorCode - Converts embedded errors. Convenience // function written to handle all cases where we have known types of // errors returned by underlying layers. func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { if err == nil { return ErrNone }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun May 05 16:56:21 GMT 2024 - 91.4K bytes - Viewed (6)