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

@@ -6,6 +6,8 @@ import React, { Component } from 'react';
import InlineDialogFailure from './InlineDialogFailure';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/**
* A MultiSelect that is also auto-completing.
*/
@@ -290,7 +292,9 @@ class MultiSelectAutocomplete extends Component {
error: false
});
})
.catch(() => {
.catch(error => {
logger.error('MultiSelectAutocomplete error in query', error);
this.setState({
error: true,
loading: false,