@@ -308,7 +308,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
308
308
}
309
309
310
310
if err := decodePayload (& req , r .Body ); err != nil {
311
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
311
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
312
312
return
313
313
}
314
314
@@ -328,7 +328,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
328
328
Identifiers []struct { Value string }
329
329
}
330
330
if err := decodePayload (& req , r .Body ); err != nil {
331
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
331
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
332
332
return
333
333
}
334
334
ca .mu .Lock ()
@@ -352,7 +352,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
352
352
defer ca .mu .Unlock ()
353
353
o , err := ca .storedOrder (strings .TrimPrefix (r .URL .Path , "/orders/" ))
354
354
if err != nil {
355
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
355
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
356
356
return
357
357
}
358
358
if err := json .NewEncoder (w ).Encode (o ); err != nil {
@@ -412,7 +412,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
412
412
orderID := strings .TrimPrefix (r .URL .Path , "/new-cert/" )
413
413
o , err := ca .storedOrder (orderID )
414
414
if err != nil {
415
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
415
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
416
416
return
417
417
}
418
418
if o .Status != acme .StatusReady {
@@ -427,7 +427,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
427
427
b , _ := base64 .RawURLEncoding .DecodeString (req .CSR )
428
428
csr , err := x509 .ParseCertificateRequest (b )
429
429
if err != nil {
430
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
430
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
431
431
return
432
432
}
433
433
// Issue the certificate.
@@ -449,7 +449,7 @@ func (ca *CAServer) handle(w http.ResponseWriter, r *http.Request) {
449
449
defer ca .mu .Unlock ()
450
450
o , err := ca .storedOrder (strings .TrimPrefix (r .URL .Path , "/issued-cert/" ))
451
451
if err != nil {
452
- ca .httpErrorf (w , http .StatusBadRequest , err . Error () )
452
+ ca .httpErrorf (w , http .StatusBadRequest , "%v" , err )
453
453
return
454
454
}
455
455
if o .Status != acme .StatusValid {
0 commit comments