:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(recording-api): fix aws error handling (#64376)
Zach Brown5ed294fb288f
diff --git a/nodejs/src/session-replay/recording-api/recording-service.ts b/nodejs/src/session-replay/recording-api/recording-service.tsindex 74da08c4e945..cdb44d1d3a91 100644--- a/nodejs/src/session-replay/recording-api/recording-service.ts+++ b/nodejs/src/session-replay/recording-api/recording-service.ts@@ -136,7 +136,7 @@ export class RecordingService {)return { ok: true, data: result }} catch (error) {- if (error instanceof NoSuchKey) {+ if (error instanceof NoSuchKey || (error as Error)?.name === 'NoSuchKey') {logger.warn('[RecordingService] S3 object not found (NoSuchKey)', {key,teamId,diff --git a/nodejs/src/session-replay/shared/keystore/dynamodb-keystore.ts b/nodejs/src/session-replay/shared/keystore/dynamodb-keystore.tsindex f2b75e7c4d75..3556b6deb385 100644--- a/nodejs/src/session-replay/shared/keystore/dynamodb-keystore.ts+++ b/nodejs/src/session-replay/shared/keystore/dynamodb-keystore.ts@@ -65,7 +65,10 @@ export class DynamoDBKeyStore implements KeyStore {}))} catch (error) {- if (error instanceof ConditionalCheckFailedException) {+ if (+ error instanceof ConditionalCheckFailedException ||+ (error as Error)?.name === 'ConditionalCheckFailedException'+ ) {// Key already exists — return the existing key instead of overwritingreturn this.getKey(sessionId, teamId)}