Skip to content

Commit 6cfe60b

Browse files
committed
integration tests in progress
1 parent 5662954 commit 6cfe60b

File tree

2 files changed

+219
-109
lines changed

2 files changed

+219
-109
lines changed

src/data-connect/data-connect-api-client-internal.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ import { ConnectorConfig, ExecuteGraphqlResponse, GraphqlOptions } from './data-
2727

2828
const API_VERSION = 'v1';
2929

30+
// TODO: CHANGE THIS BACK TO PROD - AUTOPUSH IS ONLY USED FOR LOCAL TESTING BEFORE CHANGES PROPAGATE
3031
/** The Firebase Data Connect backend service URL format. */
3132
const FIREBASE_DATA_CONNECT_SERVICES_URL_FORMAT =
32-
'https://firebasedataconnect.googleapis.com/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}:{endpointId}';
33+
'https://autopush-firebasedataconnect.sandbox.googleapis.com/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}:{endpointId}';
3334

3435
/** The Firebase Data Connect backend connector URL format. */
3536
const FIREBASE_DATA_CONNECT_CONNECTORS_URL_FORMAT =
36-
'https://firebasedataconnect.googleapis.com/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}/connectors/{connectorId}:{endpointId}';
37+
'https://autopush-firebasedataconnect.sandbox.googleapis.com/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}/connectors/{connectorId}:{endpointId}';
3738

3839
/** Firebase Data Connect service URL format when using the Data Connect emulator. */
3940
const FIREBASE_DATA_CONNECT_EMULATOR_SERVICES_URL_FORMAT =
@@ -318,6 +319,9 @@ export class DataConnectApiClient {
318319
}
319320

320321
private toFirebaseError(err: RequestResponseError): PrefixedFirebaseError {
322+
if (err.response.text?.includes('SQL')) {
323+
console.error('\n\n', err, '\n\n') // TODO: REMOVE THIS DEBUGGING PRINT STATEMENT
324+
}
321325
if (err instanceof PrefixedFirebaseError) {
322326
return err;
323327
}

0 commit comments

Comments
 (0)