* 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 |
---|---|---|
.. | ||
api | Loading commit data... | |
bus | Loading commit data... | |
cmd | Loading commit data... | |
components | Loading commit data... | |
events | Loading commit data... | |
extensions | Loading commit data... | |
infra | Loading commit data... | |
login | Loading commit data... | |
middleware | Loading commit data... | |
models | Loading commit data... | |
plugins | Loading commit data... | |
registry | Loading commit data... | |
services | Loading commit data... | |
setting | Loading commit data... | |
tsdb | Loading commit data... | |
util | Loading commit data... | |
README.md | Loading commit data... |