Skip to content

Commit

Permalink
In logging batched requests, use slightly fewer quotes / escapes. (#5…
Browse files Browse the repository at this point in the history
…308)

Fixes hashicorp/terraform-provider-google#7628.
Equally clear in the worst case, but less escaping most of the time.

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Oct 12, 2021
1 parent fc61aa8 commit 50da53b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions google/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package google
import (
"context"
"fmt"
"github.com/hashicorp/errwrap"
"log"
"sync"
"time"

"github.com/hashicorp/errwrap"
)

const defaultBatchSendIntervalSec = 3
Expand Down Expand Up @@ -177,7 +178,7 @@ func (b *RequestBatcher) SendRequestWithTimeout(batchKey string, request *BatchR
case resp := <-respCh:
if resp.err != nil {
return nil, errwrap.Wrapf(
fmt.Sprintf("Request %q returned error: {{err}}", request.DebugId),
fmt.Sprintf("Request `%s` returned error: {{err}}", request.DebugId),
resp.err)
}
return resp.body, nil
Expand Down

0 comments on commit 50da53b

Please sign in to comment.