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:
@@ -180,7 +180,6 @@ func TestGetUserFromLDAPAPIEndpoint_OrgNotfound(t *testing.T) {
|
||||
var resMap map[string]interface{}
|
||||
err = json.Unmarshal(bodyBytes, &resMap)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "unable to find organization with ID '2'", resMap["error"])
|
||||
assert.Equal(t, "An organization was not found - Please verify your LDAP configuration", resMap["message"])
|
||||
}
|
||||
|
||||
@@ -499,7 +498,6 @@ func TestPostSyncUserWithLDAPAPIEndpoint_WhenGrafanaAdmin(t *testing.T) {
|
||||
var resMap map[string]interface{}
|
||||
err = json.Unmarshal(bodyBytes, &resMap)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "did not find a user", resMap["error"])
|
||||
assert.Equal(t, "Refusing to sync grafana super admin \"ldap-daniel\" - it would be disabled", resMap["message"])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user