Details
Description
Issue Summary
Adding default reviewers to Pull requests can cause a "Database error occured" screen, if any user in Bitbucket dont have an associated email with their account.
Steps to Reproduce
- Add some users in Bitbucket without email address associated with them(Sync from external LDAP)
- Create a PR and add reviewers
Expected Results
Reviewers get added successfully.
Actual Results
Getting "An error occurred" pop-up.
The below exception is thrown in the atlassian-bitbucket.log file:
2021-11-24 11:36:21,515 ERROR [http-nio-7990-exec-5] bitbucket_user @1L2F8Q1x696x11892x0 fsvr8b 10.128.53.200 "GET /rest/ui/latest/projects/<proj_key>/repos/<repo_slug>/reviewer-groups HTTP/1.1" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exception while processing REST request: "GET /rest/ui/latest/projects/<proj_key>/repos/<repo_slug>/reviewer-groups HTTP/1.1" java.lang.NullPointerException: null
Workaround
Associate an email address with each user account in Bitbucket.