diff --git a/web/send_error.go b/web/send_error.go index 71c1971ea..72a605438 100644 --- a/web/send_error.go +++ b/web/send_error.go @@ -61,7 +61,7 @@ func SendError( // sub-problems prob.Type = probs.ProblemType(namespace) + prob.Type for i := range prob.SubProblems { - prob.SubProblems[i].Type = probs.ProblemType(namespace) + prob.Type + prob.SubProblems[i].Type = prob.Type } problemDoc, err := json.MarshalIndent(prob, "", " ") if err != nil { diff --git a/web/send_error_test.go b/web/send_error_test.go index 31eee128b..89258a086 100644 --- a/web/send_error_test.go +++ b/web/send_error_test.go @@ -44,7 +44,7 @@ func TestSendErrorSubProblemNamespace(t *testing.T) { "status": 400, "subproblems": [ { - "type": "namespace:test:namespace:test:malformed", + "type": "namespace:test:malformed", "detail": "dfoop :: nop", "status": 400, "identifier": { @@ -53,7 +53,7 @@ func TestSendErrorSubProblemNamespace(t *testing.T) { } }, { - "type": "namespace:test:namespace:test:malformed", + "type": "namespace:test:malformed", "detail": "dfoop :: nah", "status": 400, "identifier": {