Skip to content

Commit

Permalink
Try-catch stackTrace getter
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Dec 30, 2024
1 parent 84f2ec7 commit 3157124
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,13 @@ export class EdrProviderWrapper
if (isErrorResponse(response)) {
let error;

const stackTrace: SolidityStackTrace | null = responseObject.stackTrace();
// const stackTrace: SolidityStackTrace | null = responseObject.stackTrace();
let stackTrace: SolidityStackTrace | null = null;
try {
stackTrace = responseObject.stackTrace();

Check failure on line 393 in packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

View workflow job for this annotation

GitHub Actions / Lint

Property 'stackTrace' does not exist on type 'Response'.
} catch (e) {
log("Failed to get stack trace: %O", e);
}

if (stackTrace !== null) {
error = encodeSolidityStackTrace(response.error.message, stackTrace);
Expand Down

0 comments on commit 3157124

Please sign in to comment.