Add more detail to address creation failure

This commit is contained in:
Eli Ribble 2026-04-28 22:16:22 +00:00
parent d5d6201177
commit 4a90917645
No known key found for this signature in database

View file

@ -123,7 +123,7 @@ func sendMail(ctx context.Context, org_address_id string, public_id string, site
}
addr_to, err := client.AddressCreate(ctx, addr_req)
if err != nil {
return nil, fmt.Errorf("create to addr: %w", err)
return nil, fmt.Errorf("create to addr for address %d: %w", address.ID, err)
}
req := lob.RequestLetterCreate{
@ -135,7 +135,7 @@ func sendMail(ctx context.Context, org_address_id string, public_id string, site
}
letter, err := client.LetterCreate(ctx, req)
if err != nil {
return nil, fmt.Errorf("letter create: %w", err)
return nil, fmt.Errorf("letter create for address %d: %w", address.ID, err)
}
return &letter, nil