@@ -136,9 +136,8 @@ export async function handleBlobDelete (
136
136
try {
137
137
await datalake . delete ( ctx , workspace , name )
138
138
res . status ( 204 ) . send ( )
139
- } catch ( err : any ) {
140
- const message = err instanceof Error ? err . message : String ( err )
141
- ctx . error ( 'failed to delete blob' , { message } )
139
+ } catch ( error : any ) {
140
+ ctx . error ( 'failed to delete blob' , { error } )
142
141
res . status ( 500 ) . send ( )
143
142
}
144
143
}
@@ -155,9 +154,8 @@ export async function handleBlobDeleteList (
155
154
try {
156
155
await datalake . delete ( ctx , workspace , body . names )
157
156
res . status ( 204 ) . send ( )
158
- } catch ( err : any ) {
159
- const message = err instanceof Error ? err . message : String ( err )
160
- ctx . error ( 'failed to delete blobs' , { message } )
157
+ } catch ( error : any ) {
158
+ ctx . error ( 'failed to delete blobs' , { error } )
161
159
res . status ( 500 ) . send ( )
162
160
}
163
161
}
@@ -174,9 +172,8 @@ export async function handleBlobSetParent (
174
172
try {
175
173
await datalake . setParent ( ctx , workspace , name , parent )
176
174
res . status ( 204 ) . send ( )
177
- } catch ( err : any ) {
178
- const message = err instanceof Error ? err . message : String ( err )
179
- ctx . error ( 'failed to delete blob' , { message } )
175
+ } catch ( error : any ) {
176
+ ctx . error ( 'failed to delete blob' , { error } )
180
177
res . status ( 500 ) . send ( )
181
178
}
182
179
}
@@ -229,7 +226,7 @@ export async function handleUploadFormData (
229
226
return { key, metadata }
230
227
} catch ( err : any ) {
231
228
const error = err instanceof Error ? err . message : String ( err )
232
- ctx . error ( 'failed to upload blob' , { error } )
229
+ ctx . error ( 'failed to upload blob' , { error : err } )
233
230
return { key, error }
234
231
}
235
232
} )
0 commit comments