[backend/drive] Improve logging for exceptions during DriveService.StoreFile
This commit is contained in:
parent
e1d25a9231
commit
fcc04d5fd2
1 changed files with 9 additions and 1 deletions
|
@ -112,7 +112,15 @@ public class DriveService(
|
|||
: 0;
|
||||
|
||||
var stream = await GetSafeStreamOrNullAsync(input, maxLength, res.Content.Headers.ContentLength);
|
||||
return await StoreFile(stream, user, request, skipImageProcessing);
|
||||
try
|
||||
{
|
||||
return await StoreFile(stream, user, request, skipImageProcessing);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogWarning("Failed to store downloaded file from {uri}: {error}, storing as link", uri, e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue