We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
throwErrors
You can see when using a debugger to step through this code
func TestGetResponseByIdFailedRequest(t *testing.T) { errorMapping := abstractions.ErrorMappings{ "4XX": internal.CreateSampleErrorFromDiscriminatorValue, "5XX": internal.CreateSampleErrorFromDiscriminatorValue, } err := RegisterError("Userable", errorMapping) require.NoError(t, err) mockServer := makeMockRequest(200, getDummyJSON()) defer mockServer.Close() mockPath := mockServer.URL + "/$batch" reqAdapter.SetBaseUrl(mockPath) reqInfo := getRequestInfo() batch := NewBatchRequest(reqAdapter) _, err = batch.AddBatchRequestStep(*reqInfo) require.NoError(t, err) resp, err := batch.Send(context.Background(), reqAdapter) require.NoError(t, err) }
Change the following line: https://github.com/microsoftgraph/msgraph-sdk-go-core/blob/main/batch_requests.go#L269 to
return res, throwErrors(item, reflect.TypeOf(new(T)).Elem().Name())
and you'll see that the error factories are returned.
The text was updated successfully, but these errors were encountered:
rkodev
Successfully merging a pull request may close this issue.
You can see when using a debugger to step through this code
Change the following line: https://github.com/microsoftgraph/msgraph-sdk-go-core/blob/main/batch_requests.go#L269 to
and you'll see that the error factories are returned.
The text was updated successfully, but these errors were encountered: