* API: Improve error handling (#26934) * New ErrUserAlreadyExists error has been introduced * Create user endpoint returns 412 Precondition Failed on ErrUserAlreadyExists errors * Make ErrUserAlreadyExists error message clearer Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Use errors.Is instead of equality comparator on AdminCreateUser handler * Improve sqlstore/user test definition Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Improve sqlstore/user tests for ErrUserAlreadyExists cases * Remove no needed string fmt and err declaration on sqlstore/user tests * Code improvements for sqlstore/user tests Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Use err.Error() instead of sentinel error value on AdminCreateUser Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Add ErrUserAlreadyExists handling for signup & org invite use cases Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Name |
Last commit
|
Last Update |
---|---|---|
.. | ||
address.go | Loading commit data... | |
alert.go | Loading commit data... | |
alert_notifications.go | Loading commit data... | |
alert_test.go | Loading commit data... | |
apikey.go | Loading commit data... | |
context.go | Loading commit data... | |
dashboard_acl.go | Loading commit data... | |
dashboard_acl_test.go | Loading commit data... | |
dashboard_snapshot.go | Loading commit data... | |
dashboard_version.go | Loading commit data... | |
dashboards.go | Loading commit data... | |
dashboards_test.go | Loading commit data... | |
datasource.go | Loading commit data... | |
datasource_cache.go | Loading commit data... | |
datasource_cache_test.go | Loading commit data... | |
folders.go | Loading commit data... | |
health.go | Loading commit data... | |
helpflags.go | Loading commit data... | |
home_dashboard.go | Loading commit data... | |
licensing.go | Loading commit data... | |
login_attempt.go | Loading commit data... | |
models.go | Loading commit data... | |
notifications.go | Loading commit data... | |
org.go | Loading commit data... | |
org_user.go | Loading commit data... | |
playlist.go | Loading commit data... | |
plugin_setting_cache.go | Loading commit data... | |
plugin_setting_cache_test.go | Loading commit data... | |
plugin_settings.go | Loading commit data... | |
preferences.go | Loading commit data... | |
quotas.go | Loading commit data... | |
saml.go | Loading commit data... | |
search.go | Loading commit data... | |
star.go | Loading commit data... | |
stats.go | Loading commit data... | |
tags.go | Loading commit data... | |
tags_test.go | Loading commit data... | |
team.go | Loading commit data... | |
team_member.go | Loading commit data... | |
temp_user.go | Loading commit data... | |
test_data.go | Loading commit data... | |
user.go | Loading commit data... | |
user_auth.go | Loading commit data... | |
user_token.go | Loading commit data... |