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:
Bryon M 2022-04-04 07:11:20 -04:00 committed by GitHub
parent 4c058b48b6
commit 04158ee455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -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,