Skip to content

Commit a2d685f

Browse files
committed
fix(oci): log terminal object storage failures as errors
1 parent 289c230 commit a2d685f

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

‎apps/sim/lib/internal/oci-object-storage/execute-tool.test.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,8 @@ describe('OCI Object Storage tool execution boundary', () => {
132132
expect(response.status).toBe(status)
133133
expect(body.error).toContain(text)
134134
expect(JSON.stringify(body)).not.toContain('secret-key-canary')
135-
if (status >= 500) {
136-
expect(logger.error).toHaveBeenCalledOnce()
137-
expect(logger.warn).not.toHaveBeenCalled()
138-
} else {
139-
expect(logger.warn).toHaveBeenCalledOnce()
140-
expect(logger.error).not.toHaveBeenCalled()
141-
}
135+
expect(logger.error).toHaveBeenCalledOnce()
136+
expect(logger.warn).not.toHaveBeenCalled()
142137
}
143138
)
144139

‎apps/sim/lib/internal/oci-object-storage/execute-tool.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ export const executeOciObjectStorageTool: InternalToolOperationHandler<
120120
toolId: request.toolId,
121121
status: normalized.status,
122122
}
123-
if (normalized.status >= 500) {
124-
logger.error('OCI Object Storage operation failed', logContext)
125-
} else {
126-
logger.warn('OCI Object Storage operation failed', logContext)
127-
}
123+
logger.error('OCI Object Storage operation failed', logContext)
128124
return Response.json(
129125
{ success: false, error: normalized.message },
130126
{ status: normalized.status }

0 commit comments

Comments
 (0)