Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getAPIError (0.17 sec)

  1. cmd/test-utils_test.go

    	anonReq.Body = readerOne
    
    	// call the HTTP handler.
    	apiRouter.ServeHTTP(rec, anonReq)
    
    	// expected error response when the unsigned HTTP request is not permitted.
    	accessDenied := getAPIError(ErrAccessDenied).HTTPStatusCode
    	if rec.Code != accessDenied {
    		t.Fatal(failTestStr(anonTestStr, fmt.Sprintf("Object API Nil Test expected to fail with %d, but failed with %d", accessDenied, rec.Code)))
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  2. cmd/api-errors.go

    		// to a meaningful S3 API errors. This is added to aid in
    		// debugging unexpected/unhandled errors.
    		internalLogIf(ctx, err)
    	}
    
    	return apiErr
    }
    
    // getAPIError provides API Error for input API error code.
    func getAPIError(code APIErrorCode) APIError {
    	if apiErr, ok := errorCodes[code]; ok {
    		return apiErr
    	}
    	return errorCodes.ToAPIErr(ErrInternalError)
    }
    
    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)
Back to top