Improving error message when the removing of a user profile directory fails

This commit is contained in:
Julien Neuhart
2020-05-01 15:14:42 +02:00
parent f9f0fc1d67
commit 876f0f9a14

View File

@@ -119,7 +119,7 @@ func (p officePrinter) unoconv(ctx context.Context, fpath, destination string) e
userProfileDirPath := fmt.Sprintf("/tmp/%d", port)
if err := os.RemoveAll(userProfileDirPath); err != nil {
// find a way to bubble up this error?
p.logger.ErrorOpf(op, "failed to remove user profile directory '%s'", userProfileDirPath)
p.logger.ErrorOpf(op, "failed to remove user profile directory '%s': %s", userProfileDirPath, err.Error())
}
if err != nil {
// find a way to check it in the handlers?