Skip to content

Commit

Permalink
Logs failed SA.UpdatePendingAuthorization. (#2321)
Browse files Browse the repository at this point in the history
This commit resolves #2303 by updating the comment, and returned error type produced when the RA calls `SA.UpdatePendingAuthorization` and it fails.

Previously this produced a `MalformedRequestError` that was described as only happening when the client corrupted the challenge data.

Now this is returned as more descriptive `ServerInternalError` and the underlying error from the SA is logged as a warning for further debugging.
  • Loading branch information
cpu authored and jsha committed Nov 11, 2016
1 parent 5c874cc commit 9b89aa7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ra/ra.go
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,9 @@ func (ra *RegistrationAuthorityImpl) UpdateAuthorization(ctx context.Context, ba

// Store the updated version
if err = ra.SA.UpdatePendingAuthorization(ctx, authz); err != nil {
// This can pretty much only happen when the client corrupts the Challenge
// data.
err = core.MalformedRequestError("Challenge data was corrupted")
ra.log.Warning(fmt.Sprintf(
"Error calling ra.SA.UpdatePendingAuthorization: %s\n", err.Error()))
err = core.InternalServerError("Could not update pending authorization")
return
}
ra.stats.Inc("NewPendingAuthorizations", 1)
Expand Down

0 comments on commit 9b89aa7

Please sign in to comment.