[acme db interface] wip
This commit is contained in:
parent
03ba229bcb
commit
1135ae04fc
12 changed files with 251 additions and 222 deletions
|
@ -14,10 +14,9 @@ import (
|
|||
|
||||
// WriteError writes to w a JSON representation of the given error.
|
||||
func WriteError(w http.ResponseWriter, err error) {
|
||||
switch k := err.(type) {
|
||||
switch err.(type) {
|
||||
case *acme.Error:
|
||||
w.Header().Set("Content-Type", "application/problem+json")
|
||||
err = k.ToACME()
|
||||
default:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue