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:
@ -4048,11 +4048,6 @@ export class Connection {
|
|||||||
let logs;
|
let logs;
|
||||||
if ('data' in res.error) {
|
if ('data' in res.error) {
|
||||||
logs = res.error.data.logs;
|
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(
|
throw new SendTransactionError(
|
||||||
'failed to send transaction: ' + res.error.message,
|
'failed to send transaction: ' + res.error.message,
|
||||||
|
Reference in New Issue
Block a user