Skip to content

Commit 89e2dfe

Browse files
authored
sa: improve errors from SetOrderError (#8656)
We were returning ServerInternal errors and dropping the actual error message on the floor. Instead, return a plain error (which will get turned into a serverInternal error higher in the stack). This avoids losing error messages from the database layer.
1 parent 14a05d3 commit 89e2dfe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sa/sa.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,12 @@ func (ssa *SQLStorageAuthority) SetOrderError(ctx context.Context, req *sapb.Set
633633
errJSON,
634634
req.Id)
635635
if err != nil {
636-
return nil, berrors.InternalServerError("error updating order error field")
636+
return nil, fmt.Errorf("updating order error field: %s", err)
637637
}
638638

639639
n, err := result.RowsAffected()
640640
if err != nil || n == 0 {
641-
return nil, berrors.InternalServerError("no order updated with new error field")
641+
return nil, fmt.Errorf("no order updated with new error field: %s", err)
642642
}
643643

644644
return nil, nil

0 commit comments

Comments
 (0)