Skip to content

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API

Returns the last error only

Acho Arnoldd6ec13e21ce3
diff --git a/api/pkg/repositories/repository.go b/api/pkg/repositories/repository.go
index 558e5249..14285dc4 100644
--- a/api/pkg/repositories/repository.go
+++ b/api/pkg/repositories/repository.go
@@ -36,6 +36,7 @@ func isRetryableError(err error) bool {
func executeWithRetry(fn func() error) (err error) {
return retry.Do(
fn,
+ retry.LastErrorOnly(true),
retry.Attempts(3),
retry.Delay(100*time.Millisecond),
retry.RetryIf(isRetryableError),