🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(blob-storage): surface SDK error cause in validation failure messages (#14276)
Niklas Semmler11812703ac9b
diff --git a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts b/web/src/features/blobstorage-integration/blobstorage-integration-router.tsindex 88a50325f5..718ba97de9 100644--- a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts+++ b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts@@ -39,8 +39,16 @@ const getAuditLogErrorType = (error: unknown) =>? error.name: "UnknownError";-const getErrorMessage = (error: unknown, fallback: string) =>- error instanceof Error ? error.message : fallback;+const getErrorMessage = (error: unknown, fallback: string): string => {+ if (!(error instanceof Error)) return fallback;+ // Walk one level of cause to surface the SDK error (e.g. "Access Denied")+ // without exposing arbitrarily deep internal details.+ const cause = error.cause;+ if (cause instanceof Error && cause.message) {+ return `${error.message}: ${cause.message}`.slice(0, 500);+ }+ return error.message;+};export const blobStorageIntegrationRouter = createTRPCRouter({get: protectedProjectProcedure