File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
apps/sim/app/api/tools/google_drive/download Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -143,18 +143,15 @@ export async function POST(request: NextRequest) {
143143 . catch ( ( ) => ( { } ) ) ) as GoogleApiErrorResponse
144144 const errorMessage = exportError . error ?. message || ''
145145
146- const hasCustomFormat = ! ! exportMimeType
147146 const defaultFormat = DEFAULT_EXPORT_FORMATS [ fileMimeType ]
148- if (
149- hasCustomFormat &&
150- defaultFormat &&
151- exportMimeType !== defaultFormat &&
152- errorMessage . toLowerCase ( ) . includes ( 'conversion' )
153- ) {
154- logger . warn ( `[${ requestId } ] Export format not supported, falling back to default` , {
147+ const canFallback = ! ! exportMimeType && ! ! defaultFormat && exportMimeType !== defaultFormat
148+
149+ if ( canFallback ) {
150+ logger . warn ( `[${ requestId } ] Export failed with custom format, falling back to default` , {
155151 requestedFormat : exportFormat ,
156152 fallbackFormat : defaultFormat ,
157153 fileMimeType,
154+ status : exportResponse . status ,
158155 } )
159156
160157 finalMimeType = defaultFormat
You can’t perform that action at this time.
0 commit comments