fix: stop logging to console when send tx fails (#23511)
There is no need to log the error to the console. Developers can simply catch the error and handle it themselves without it cluttering production logs.
This commit is contained in:
parent
4c058b48b6
commit
04158ee455
|
@ -4048,11 +4048,6 @@ export class Connection {
|
|||
let logs;
|
||||
if ('data' in res.error) {
|
||||
logs = res.error.data.logs;
|
||||
if (logs && Array.isArray(logs)) {
|
||||
const traceIndent = '\n ';
|
||||
const logTrace = traceIndent + logs.join(traceIndent);
|
||||
console.error(res.error.message, logTrace);
|
||||
}
|
||||
}
|
||||
throw new SendTransactionError(
|
||||
'failed to send transaction: ' + res.error.message,
|
||||
|
|
Loading…
Reference in New Issue