MCPcopy Index your code
hub / github.com/coder/coder / requireChatLastErrorPayload

Function requireChatLastErrorPayload

coderd/x/chatd/chatd_test.go:166–173  ·  view source on GitHub ↗
(t testing.TB, raw pqtype.NullRawMessage)

Source from the content-addressed store, hash-verified

164}
165
166func requireChatLastErrorPayload(t testing.TB, raw pqtype.NullRawMessage) codersdk.ChatError {
167 t.Helper()
168 require.True(t, raw.Valid, "last error should be set")
169
170 var payload codersdk.ChatError
171 require.NoError(t, json.Unmarshal(raw.RawMessage, &payload))
172 return payload
173}
174
175func chatLastErrorMessage(raw pqtype.NullRawMessage) string {
176 if !raw.Valid {

Calls 2

HelperMethod · 0.65
UnmarshalMethod · 0.45

Tested by

no test coverage detected