import React from 'react' import lbry from 'lbry' import { ExpandableModal } from 'component/modal' class ErrorModal extends React.Component { render() { const { modal, closeModal, error } = this.props const errorObj = typeof error === "string" ? { error: 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(error)) { let val = typeof error[key] == 'string' ? error[key] : JSON.stringify(error[key]); let label = error_key_labels[key]; errorInfoList.push(
{val}
We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.