Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestAPIErrCode (0.22 sec)

  1. cmd/api-errors_test.go

    	{err: errObjectTampered, errCode: ErrObjectTampered},
    
    	{err: nil, errCode: ErrNone},
    	{err: errors.New("Custom error"), errCode: ErrInternalError}, // Case where err type is unknown.
    }
    
    func TestAPIErrCode(t *testing.T) {
    	ctx := context.Background()
    	for i, testCase := range toAPIErrorTests {
    		errCode := toAPIErrorCode(ctx, testCase.err)
    		if errCode != testCase.errCode {
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Mon Sep 25 15:13:08 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top