client.go ×4

Frontier kind: Code frontier

unlabeled · c_3e57aa5867e6

4 tests · 2494 LOC · 120 files · introduces 0 tests · 14 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges14 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
418 ranges2494 lines · 120 files · Browse complete extent
All tests (intent)
4 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.

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.

2 files ranked by introduced lines: 14 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 12 introduced LOC · 4 ranges

Open complete file

60 }
61
62 > func newUnexpectedResponseError(message string, response *http.Response, body []byte) error { client.go
63 > var failure *nexus.Failure
64 > if isMediaTypeJSON(response.Header.Get("Content-Type")) {
65 if err := json.Unmarshal(body, &failure); err == nil && failure.Message != "" {
66 message += ": " + failure.Message
68 }
69
70 > return &UnexpectedResponseError{ client.go
71 > Message: message,
72 > Details: response,
73 > Failure: failure,
74 > }
75 }
76
89 func (c *baseHTTPClient) failureFromResponse(response *http.Response, body []byte) (nexus.Failure, error) {
90 if !isMediaTypeJSON(response.Header.Get("Content-Type")) {
91 > return nexus.Failure{}, newUnexpectedResponseError(fmt.Sprintf("invalid response content type: %q", response.Header.Get("Content-Type")), response, body) client.go
92 > }
93 var failure nexus.Failure
94 err := json.Unmarshal(body, &failure)
122 failure, err := c.failureFromResponse(response, body)
123 if err != nil {
124 > return c.defaultErrorFromResponse(response, body, nil) client.go
125 > }
126 convErr, err := c.failureConverter.FailureToError(failure)
127 if err != nil {
go.temporal.io/server/common/nexus/nexusrpc/api.go 2 introduced LOC · 1 range

Open complete file

45 func isMediaTypeJSON(contentType string) bool {
46 if contentType == "" {
47 > return false api.go
48 > }
49 mediaType, _, err := mime.ParseMediaType(contentType)
50 return err == nil && mediaType == "application/json"