grafana/pkg/services
Joan López de la Franca Beltran ef631582ba
Users: Improve conflict error handling (#26958)
* 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>
2020-08-13 14:38:54 +02:00
..
alerting Chore: Drop xerrors dependency (#26718) 2020-07-31 09:45:20 +02:00
annotations Annotations: use a single row to represent a region (#17673) 2019-08-16 10:49:30 +02:00
auth Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
cleanup Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
dashboards Chore: Drop xerrors dependency (#26718) 2020-07-31 09:45:20 +02:00
datasources chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00
guardian Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
hooks Footer: Display Grafana edition (#21717) 2020-01-27 09:24:44 +01:00
ldap LDAP: users without org mappings are marked as disabled (#26650) 2020-07-31 14:41:31 +02:00
licensing provide license token directly via plugin environment (#25987) 2020-07-01 13:02:53 -04:00
live Live: include a streaming event manager (#26537) 2020-07-27 00:26:16 -07:00
login Chore: Use errors.Is for comparing errors (#26719) 2020-07-31 10:16:49 +02:00
multildap Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
notifications Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
provisioning Provisioning: describe which folder caused an error while provisioning from files structure (#26771) 2020-08-04 09:03:09 -07:00
quota Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
rendering Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
search Provisioning: Fix bug when provision app plugins using Enterprise edition (#26340) 2020-07-16 10:36:08 +02:00
sqlstore Users: Improve conflict error handling (#26958) 2020-08-13 14:38:54 +02:00
teamguardian chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00