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 authored and GitHub committed 2023-10-30 14:06:26 -04:00
1 parent 40df27a4da
commit e4d1fdc3d0
12 files changed
+16 -49

No files matched your search

+1 -1
View File
@@ -230,7 +230,7 @@ func TestAdminAPIEndpoint(t *testing.T) {
respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes())
require.NoError(t, err)
assert.Equal(t, "user already exists", respJSON.Get("error").MustString())
assert.Equal(t, "User with email '' or username 'existing@example.com' already exists", respJSON.Get("message").MustString())
})
})
}