From 9b89aa7d2c9551b58e0a045cc5e9cd85f3b85e3a Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Fri, 11 Nov 2016 12:26:53 -0500 Subject: [PATCH] Logs failed SA.UpdatePendingAuthorization. (#2321) 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. --- ra/ra.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ra/ra.go b/ra/ra.go index 94353052856..f79448d7823 100644 --- a/ra/ra.go +++ b/ra/ra.go @@ -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)