improve invite error handling (#2649)

* fix(invite): do not send empty queries for people search

The endpoint might return an error if an empty query is sent.

* fix(invite): add error logging for failed people directory requests

The error currently being passed through from $.getJSON ended up
being an empty string plus was not getting logged. So switch to
fetch to move along with jquery killing and log the error.

* fix(dial-in): add error logging for failed requests

* ref(invite): create a fetch helper to remove duplicate logic
This commit is contained in:
virtuacoplenny
2018-03-23 09:37:04 -07:00
committed by bbaldino
parent 83f47c2df1
commit 1b91e0bc2f
7 changed files with 94 additions and 16 deletions

View File

@@ -568,7 +568,7 @@ class AddPeopleDialog extends Component<*, *> {
let peopleSearchPromise;
if (this.props.enableAddPeople) {
if (this.props.enableAddPeople && text) {
peopleSearchPromise = searchDirectory(
_peopleSearchUrl,
_jwt,