Skip to content

Commit 05323a1

Browse files
committed
Fix tests
1 parent c754a96 commit 05323a1

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

e2e/load-on-init/load-on-init.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ it('should load the proxy schema on init', async () => {
2525
gateway({
2626
args: ['proxy', 'http://localhost:65432'],
2727
}),
28-
).rejects.toThrow(/DOWNSTREAM_SERVICE_ERROR/);
28+
).rejects.toThrow(/SUBREQUEST_HTTP_ERROR/);
2929
});

packages/federation/tests/unavailable-subgraph.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ describe('Yoga gateway - subgraph unavailable', () => {
188188
{
189189
message: expect.stringContaining('connect'),
190190
extensions: {
191+
code: 'SUBREQUEST_HTTP_ERROR',
191192
request: {
192193
body: '{"query":"{__typename testNestedField{subgraph2{testSuccessQuery{id email sub2}}}}"}',
193194
method: 'POST',
@@ -229,6 +230,7 @@ describe('Yoga gateway - subgraph unavailable', () => {
229230
{
230231
message: expect.stringContaining('connect'),
231232
extensions: {
233+
code: 'SUBREQUEST_HTTP_ERROR',
232234
request: {
233235
body: '{"query":"{__typename testNestedField{subgraph2{testErrorQuery{id email sub2}}}}"}',
234236
method: 'POST',

packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ describe('useOpenTelemetry', () => {
12651265
[SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH]:
12661266
'd40f732de805d03db6284b9b8c6c6f0b',
12671267
[SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT]: 1,
1268-
[SEMATTRS_HIVE_GRAPHQL_ERROR_CODES]: ['DOWNSTREAM_SERVICE_ERROR'],
1268+
[SEMATTRS_HIVE_GRAPHQL_ERROR_CODES]: ['RESPONSE_VALIDATION_FAILED'],
12691269

12701270
// Execution Attributes
12711271
[SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES]: ['upstream'],

packages/runtime/tests/subgraph-down.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('Error handling', () => {
113113
errors: [
114114
{
115115
extensions: {
116-
code: 'DOWNSTREAM_SERVICE_ERROR',
116+
code: 'RESPONSE_VALIDATION_FAILED',
117117
request: {
118118
body: `{"query":"{__typename subgraph1{subgraph1Field}}"}`,
119119
method: 'POST',
@@ -229,7 +229,7 @@ describe('Error handling', () => {
229229
errors: [
230230
{
231231
extensions: {
232-
code: 'DOWNSTREAM_SERVICE_ERROR',
232+
code: 'RESPONSE_VALIDATION_FAILED',
233233
request: {
234234
body: `{"query":"{__typename subgraph1{subgraph1Field}}"}`,
235235
method: 'POST',

0 commit comments

Comments
 (0)