client.go ×5

Frontier kind: Code frontier

unlabeled · c_cc18c22b8b65

6 tests · 38 LOC · 2 files · introduces 0 tests · 19 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges19 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
14 ranges38 lines · 2 files · Browse complete extent
All tests (intent)
6 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationretryable-http-error · 0 introduced LOCretryable-http-errorinvocable_outbound.go ×1 · 1 introduced LOCinvocable_outbound.go ×1invocable_outbound.go ×2 · 4 introduced LOCinvocable_outbound.go ×2retryable-error · 0 introduced LOCretryable-errornexus_invocation.go ×1 · 1 introduced LOCnexus_invocation.go ×1nexus_invocation.go ×2 · 4 introduced LOCnexus_invocation.go ×2client.go ×4 · 14 introduced LOCclient.go ×4client.go ×1 · 4 introduced LOCclient.go ×1client.go ×1 · 2 introduced LOCclient.go ×1client.go ×1 · 2 introduced LOCclient.go ×1client.go ×1 · 2 introduced LOCclient.go ×1client.go ×1 · 2 introduced LOCclient.go ×1client.go ×1 · 2 introduced LOCclient.go ×1client.go ×1 · 3 introduced LOCclient.go ×1api.go ×2 · 3 introduced LOCapi.go ×2client.go ×1 · 2 introduced LOCclient.go ×1api.go ×1 · 1 introduced LOCapi.go ×1client.go ×2 · 6 introduced LOCclient.go ×2api.go ×1 · 2 introduced LOCapi.go ×1api.go ×1 · 2 introduced LOCapi.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/chasm/lib/callback/invocable_outbound.go · 110 LOCcallback/invocable_outbo…go.temporal.io/server/common/nexus/nexusrpc/api.go · 295 LOCnexusrpc/api.gogo.temporal.io/server/common/nexus/nexusrpc/client.go · 502 LOCnexusrpc/client.gogo.temporal.io/server/common/nexus/nexusrpc/server.go · 404 LOCnexusrpc/server.gogo.temporal.io/server/components/callbacks/nexus_invocation.go · 111 LOCcallbacks/nexus_invocati…non-retryable-http-error · introduced test · go.temporal.io/server/chasm/lib/callback/TestExecuteInvocationTaskNexus_Outcomes/non-retryable-http-errornon-retryable-http-errorretryable-http-error · introduced test · go.temporal.io/server/chasm/lib/callback/TestExecuteInvocationTaskNexus_Outcomes/retryable-http-errorretryable-http-errorTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestCustomFailureConverter · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestCustomFailureConverterTestCustomFailureConvert…TestHandlerErrorRetryBehavior · introduced test · go.temporal.io/server/common/nexus/nexusrpc/TestHandlerErrorRetryBehaviorTestHandlerErrorRetryBeh…non-retryable-error · introduced test · go.temporal.io/server/components/callbacks/TestProcessInvocationTaskNexus_Outcomes/non-retryable-errornon-retryable-errorretryable-error · introduced test · go.temporal.io/server/components/callbacks/TestProcessInvocationTaskNexus_Outcomes/retryable-errorretryable-errorFocused concept · client.go ×5 · 19 introduced LOCclient.go ×5

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 19 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/nexus/nexusrpc/client.go 19 introduced LOC · 5 ranges

Open complete file

96 }
97
98 > func (c *baseHTTPClient) defaultErrorFromResponse(response *http.Response, body []byte, cause error) error { client.go
99 > errorType, err := httpStatusCodeToHandlerErrorType(response)
100 > if err != nil {
101 // TODO(bergundy): optimization - use the provided cause, it's already a deserialized failure.
102 return newUnexpectedResponseError(err.Error(), response, body)
103 }
104 > handlerErr := &nexus.HandlerError{ client.go
105 > Type: errorType,
106 > // For compatibility with older servers.
107 > RetryBehavior: retryBehaviorFromHeader(response.Header),
108 > Cause: cause,
109 > }
110 >
111 > // Ensure the original failure is available, the calling code expects it.
112 > originalFailure, err := c.failureConverter.ErrorToFailure(handlerErr)
113 > if err != nil {
114 return newUnexpectedResponseError("failed to construct handler error from response: "+err.Error(), response, body)
115 }
116 > handlerErr.OriginalFailure = &originalFailure client.go
117 > return handlerErr
118 }
119
423 }
424
425 > func httpStatusCodeToHandlerErrorType(response *http.Response) (nexus.HandlerErrorType, error) { client.go
426 > switch response.StatusCode {
427 case http.StatusBadRequest:
428 return nexus.HandlerErrorTypeBadRequest, nil
452 }
453
454 > func retryBehaviorFromHeader(header http.Header) nexus.HandlerErrorRetryBehavior { client.go
455 > switch strings.ToLower(header.Get(headerRetryable)) {
456 case "true":
457 return nexus.HandlerErrorRetryBehaviorRetryable