I have successfully created/deployed several SaaS Conn connectors in the past few month but running into issue with the latest one.
I am able to test fine locally but when trying to test with the same token (same config.json) in the tenant I am running into error indicating that token is incorrect. I have checked and service that I am calling does not block/distinguish between external clients (in fact I have called fine from my computer at home). I tried deleting and recreating this connector…looking for any advise on what else I can do?
Here is the results of deploying and testing connector in the tenant:
> [email protected] prebuild
> npm run clean
> [email protected] clean
> shx rm -rf ./dist
> [email protected] build
> npx ncc build ./src/index.ts -o ./dist -m -C
ncc: Version 0.34.0
ncc: Compiling file index.js into CJS
ncc: Using [email protected] (local user-provided)
0kB dist/file.js
1kB dist/worker-pipeline.js
1kB dist/worker.js
5kB dist/worker1.js
1609kB dist/index.js
1616kB [3541ms] - ncc 0.34.0
> [email protected] prepack-zip
> npm ci && npm run build
npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated [email protected]: Use your platform's native DOMException instead
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
added 495 packages in 3s
49 packages are looking for funding
run `npm fund` for details
> [email protected] prebuild
> npm run clean
> [email protected] clean
> shx rm -rf ./dist
> [email protected] build
> npx ncc build ./src/index.ts -o ./dist -m -C
ncc: Version 0.34.0
ncc: Compiling file index.js into CJS
ncc: Using [email protected] (local user-provided)
0kB dist/file.js
1kB dist/worker-pipeline.js
1kB dist/worker.js
5kB dist/worker1.js
1609kB dist/index.js
1616kB [3920ms] - ncc 0.34.0
> [email protected] pack-zip
> spcx package
Connector zip file created under dist folder: r2-idn-connector2-0.1.0.zip
+--------------------------------------+---------+
| CONNECTOR ID | VERSION |
+--------------------------------------+---------+
| 5e01ac94-5efb-411d-bd37-62be4864d95a | 1 |
+--------------------------------------+---------+
CYT6Q4QFVT:r2-idn-connector ralph.mishiev$ sail connectors invoke test-connection -c r2-idn-connector2 -p config.json
2024/01/04 09:57:27 Running "std:test-connection" with "{}"
Error: non-200 response: 400 Bad Request (body {
"detailCode": "Bad Request",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "[ConnectorError] Failed in testConnection: Error \"Request failed with status code 403\""
}
],
"trackingId": "3f3eaa8c7fe34d03a2721ca24e4bf467"
})