Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. cmd/api-errors.go

    		}
    	}
    
    	return apiErr
    }
    
    var noError = APIError{}
    
    // toAPIError - Converts embedded errors. Convenience
    // function written to handle all cases where we have known types of
    // errors returned by underlying layers.
    func toAPIError(ctx context.Context, err error) APIError {
    	if err == nil {
    		return noError
    	}
    
    	apiErr := errorCodes.ToAPIErr(toAPIErrorCode(ctx, err))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 91.4K bytes
    - Viewed (7)
  2. cmd/test-utils_test.go

    	}
    	if toStorageErr(nil) != nil {
    		t.Errorf("Test expected to return nil, failed instead got a non-nil value %s", toStorageErr(nil))
    	}
    	ctx := context.Background()
    	if toAPIError(ctx, nil) != noError {
    		t.Errorf("Test expected error code to be ErrNone, failed instead provided %s", toAPIError(ctx, nil).Code)
    	}
    }
    
    // Uploads an object using DummyDataGen directly via the http
    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)
Back to top