Hi everyone,
We recently experienced a problem with your Node JS API and we need help with resolving the issue.
The following line:
const apiResponse = await hubspotClient.files.filesApi.getSignedUrl(fileId, size, expirationSeconds, upscale);
is working fine for documents not marked as sensitive. However, for the ones marked as sensitive, it’s causing the following error to occur:
ApiException [Error]: HTTP-Code: 404
The filed is 112892509882 and the rest of the parameters are set to “undefined”.
Here’s the full response we get back:
file id 112892509882
error getSignedUrl ApiException [Error]: HTTP-Code: 404
Message: An error occurred.
Body: “<html>\n<head>\n<meta http-equiv=\“Content-Type\” content=\“text/html;charset=utf-8\”/>\n<title>Error 404 Not Found</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Resource not found</p>\n</body>\n</html>\n”
Headers: {“access-control-allow-credentials”:“false”,“cache-control”:“must-revalidate,no-cache,no-store”,“cf-cache-status”:“DYNAMIC”,“cf-ray”:“8b739e73c8316515-LHR”,“connection”:“close”,“content-encoding”:“gzip”,“content-type”:“text/html;charset=iso-8859-1”,“date”:“Thu, 22 Aug 2024 14:40:36 GMT”,“nel”:“{\“success_fraction\”:0.01,\“report_to\”:\“cf-nel\”,\“max_age\”:604800}”,“report-to”:“{\“endpoints\”:[{\“url\”:\“https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=WFP8uu1WGKuYqMoux6KOeE2OguY%2FkhMF%2BEhadEhzXLnWx9AWXVIwrK8I6zce3E0IXBwzAd3uTRxY2MLLjjDyYGtNY7mR0g1wqma92GVZnLSr2aSWl42nCIcvOpNmpr0O\”}],\“group\”:\“cf-nel\”,\“max_age\”:604800}”,“server”:“cloudflare”,“strict-transport-security”:“max-age=31536000; includeSubDomains; preload”,“transfer-encoding”:“chunked”,“vary”:“origin, Accept-Encoding”,“x-content-type-options”:“nosniff”,“x-envoy-upstream-service-time”:“10”,“x-evy-trace-listener”:“listener_https”,“x-evy-trace-route-configuration”:“listener_https/all”,“x-evy-trace-route-service-name”:“envoyset-translator”,“x-evy-trace-served-by-pod”:“fra04/hubapi-td/envoy-proxy-576d445cf9-bhvbv”,“x-evy-trace-virtual-host”:“all”,“x-hubspot-correlation-id”:“93291384-f16d-445f-bec9-116d062f4908”,“x-hubspot-notfound”:“true”,“x-hubspot-ratelimit-daily”:“1000000”,“x-hubspot-ratelimit-daily-remaining”:“994333”,“x-hubspot-ratelimit-interval-milliseconds”:“10000”,“x-hubspot-ratelimit-max”:“190”,“x-hubspot-ratelimit-remaining”:“186”,“x-hubspot-ratelimit-secondly”:“19”,“x-hubspot-ratelimit-secondly-remaining”:“18”,“x-request-id”:“93291384-f16d-445f-bec9-116d062f4908”}
at FilesApiResponseProcessor.<anonymous> (/Users/hadi/Sites/hubspot-isams-sync/node_modules/@hubspot/api-client/codegen/files/apis/FilesApi.ts:990:19)
at Generator.next (<anonymous>)
at fulfilled (/Users/hadi/Sites/hubspot-isams-sync/node_modules/@hubspot/api-client/lib/codegen/files/apis/FilesApi.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 404,
body: ‘<html>\n’ +
‘<head>\n’ +
‘<meta http-equiv=“Content-Type” content=“text/html;charset=utf-8”/>\n’ +
‘<title>Error 404 Not Found</title>\n’ +
‘</head>\n’ +
‘<body><h2>HTTP ERROR 404</h2>\n’ +
‘<p>Resource not found</p>\n’ +
‘</body>\n’ +
‘</html>\n’,
headers: {
‘access-control-allow-credentials’: ‘false’,
‘cache-control’: ‘must-revalidate,no-cache,no-store’,
‘cf-cache-status’: ‘DYNAMIC’,
‘cf-ray’: ‘8b739e73c8316515-LHR’,
connection: ‘close’,
‘content-encoding’: ‘gzip’,
‘content-type’: ‘text/html;charset=iso-8859-1’,
date: ‘Thu, 22 Aug 2024 14:40:36 GMT’,
nel: ‘{“success_fraction”:0.01,“report_to”:“cf-nel”,“max_age”:604800}’,
‘report-to’: ‘{“endpoints”:[{“url”:“https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=WFP8uu1WGKuYqMoux6KOeE2OguY%2FkhMF%2BEhadEhzXLnWx9AWXVIwrK8I6zce3E0IXBwzAd3uTRxY2MLLjjDyYGtNY7mR0g1wqma92GVZnLSr2aSWl42nCIcvOpNmpr0O”}],“group”:“cf-nel”,“max_age”:604800}’,
server: ‘cloudflare’,
‘strict-transport-security’: ‘max-age=31536000; includeSubDomains; preload’,
‘transfer-encoding’: ‘chunked’,
vary: ‘origin, Accept-Encoding’,
‘x-content-type-options’: ‘nosniff’,
‘x-envoy-upstream-service-time’: ‘10’,
‘x-evy-trace-listener’: ‘listener_https’,
‘x-evy-trace-route-configuration’: ‘listener_https/all’,
‘x-evy-trace-route-service-name’: ‘envoyset-translator’,
‘x-evy-trace-served-by-pod’: ‘fra04/hubapi-td/envoy-proxy-576d445cf9-bhvbv’,
‘x-evy-trace-virtual-host’: ‘all’,
‘x-hubspot-correlation-id’: ‘93291384-f16d-445f-bec9-116d062f4908’,
‘x-hubspot-notfound’: ‘true’,
‘x-hubspot-ratelimit-daily’: ‘1000000’,
‘x-hubspot-ratelimit-daily-remaining’: ‘994333’,
‘x-hubspot-ratelimit-interval-milliseconds’: ‘10000’,
‘x-hubspot-ratelimit-max’: ‘190’,
‘x-hubspot-ratelimit-remaining’: ‘186’,
‘x-hubspot-ratelimit-secondly’: ‘19’,
‘x-hubspot-ratelimit-secondly-remaining’: ‘18’,
‘x-request-id’: ‘93291384-f16d-445f-bec9-116d062f4908’
}
}