From 876f0f9a1439b6c0d4c541bb35b16a432a074046 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Fri, 1 May 2020 15:14:42 +0200 Subject: [PATCH] Improving error message when the removing of a user profile directory fails --- internal/pkg/printer/office.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/printer/office.go b/internal/pkg/printer/office.go index 9bfcebb3..79f66e93 100644 --- a/internal/pkg/printer/office.go +++ b/internal/pkg/printer/office.go @@ -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?