import React from "react"; import lbry from "lbry"; import { ExpandableModal } from "modal/modal"; class ModalError extends React.PureComponent { render() { const { closeModal, error } = this.props; const errorObj = typeof error === "string" ? { message: error } : error; const error_key_labels = { connectionString: __("API connection string"), method: __("Method"), params: __("Parameters"), code: __("Error code"), message: __("Error message"), data: __("Error data"), }; const errorInfoList = []; for (let key of Object.keys(errorObj)) { let val = typeof errorObj[key] == "string" ? errorObj[key] : JSON.stringify(errorObj[key]); let label = error_key_labels[key]; errorInfoList.push(
  • {label}: {val}
  • ); } const errorInfo = ( ); return (

    {__("Error")}

    {__( "We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem." )}

    ); } } export default ModalError;