diff --git a/js/src/common/components/RequestErrorModal.js b/js/src/common/components/RequestErrorModal.js index 2a0aaa2a7..2ef035c55 100644 --- a/js/src/common/components/RequestErrorModal.js +++ b/js/src/common/components/RequestErrorModal.js @@ -1,32 +1,32 @@ import Modal from './Modal'; export default class RequestErrorModal extends Modal { - className() { - return 'RequestErrorModal Modal--large'; - } - - title() { - return this.props.error.xhr ? this.props.error.xhr.status + ' ' + this.props.error.xhr.statusText : ''; - } - - content() { - let responseText; - - try { - responseText = JSON.stringify(JSON.parse(this.props.error.responseText), null, 2); - } catch (e) { - responseText = this.props.error.responseText; + className() { + return 'RequestErrorModal Modal--large'; } - return ( -
- {this.props.error.options.method} {this.props.error.options.url} --
-
- {responseText} -
+ {this.props.error.options.method} {this.props.error.options.url} ++
+
+ {responseText} +