diff --git a/client/src/components/UploadField/UploadField.js b/client/src/components/UploadField/UploadField.js index c22f6ae3a..dcc69ac3d 100644 --- a/client/src/components/UploadField/UploadField.js +++ b/client/src/components/UploadField/UploadField.js @@ -234,7 +234,7 @@ class UploadField extends Component { handleFailedUpload(file, response) { const statusCodeMessage = file.xhr && file.xhr.status - ? getStatusCodeMessage(file.xhr.status) + ? getStatusCodeMessage(file.xhr.status, file.xhr) : ''; this.props.actions.uploadField.failUpload( this.props.id, diff --git a/client/src/containers/Gallery/Gallery.js b/client/src/containers/Gallery/Gallery.js index 2331d74ef..8d50bc75c 100644 --- a/client/src/containers/Gallery/Gallery.js +++ b/client/src/containers/Gallery/Gallery.js @@ -318,11 +318,11 @@ class Gallery extends Component { } } - /** - * Handler for when the user changes the sort order - * - * @param {string} value - */ + /** + * Handler for when the user changes the sort order + * + * @param {string} value + */ handleSort(value) { this.props.actions.queuedFiles.purgeUploadQueue(); this.props.onSort(value); @@ -436,7 +436,7 @@ class Gallery extends Component { handleFailedUpload(fileXhr, response) { const statusCodeMessage = fileXhr.xhr && fileXhr.xhr.status - ? getStatusCodeMessage(fileXhr.xhr.status) + ? getStatusCodeMessage(fileXhr.xhr.status, fileXhr.xhr) : ''; this.props.actions.queuedFiles.failUpload(fileXhr._queuedId, response, statusCodeMessage); } @@ -868,10 +868,10 @@ class Gallery extends Component {
{ errorMessage }
} - { hasGraphQLErrors && graphQLErrors.map((error, index) => ( + {errorMessage &&{errorMessage}
} + {hasGraphQLErrors && graphQLErrors.map((error, index) => ( // eslint-disable-next-line react/no-array-index-key{error}
))} @@ -897,10 +897,10 @@ class Gallery extends Component { const messages = (