Errors: Make errors the same in dev as prod (#77366)

When running in dev mode, error messages would contain an additional "error" property alongside "message". Since this causes confusion, that has been removed and now error messages are the same both modes (using "message").
This commit is contained in:
Kyle Brandt
2023-10-30 14:06:26 -04:00
committed by GitHub
parent 40df27a4da
commit e4d1fdc3d0
12 changed files with 16 additions and 49 deletions

View File

@@ -77,7 +77,7 @@ func TestProvisioningApi(t *testing.T) {
response := sut.RoutePutPolicyTree(&rc, tree)
require.Equal(t, 400, response.Status())
expBody := `{"error":"invalid object specification: invalid policy tree","message":"invalid object specification: invalid policy tree"}`
expBody := `{"message":"invalid object specification: invalid policy tree"}`
require.Equal(t, expBody, string(response.Body()))
})
})