Skip to content

fix: safe hashes script execution#96

Merged
bernacodesido merged 2 commits intorootstockfrom
fix/safe_hashes
Jun 24, 2025
Merged

fix: safe hashes script execution#96
bernacodesido merged 2 commits intorootstockfrom
fix/safe_hashes

Conversation

@bernacodesido
Copy link
Copy Markdown
Member

Fix the safe hashes script execution
handle errors

Copilot AI review requested due to automatic review settings June 23, 2025 19:57
@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the safe hashes script execution and improves error handling across various components.

  • Updates test expectations and error handling for safe hash parsing.
  • Refines API types and notification messages for safe transaction hashes.
  • Adds retry logic and enhanced timeouts in the safe hashes execution script.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/SafeWatcher.test.ts Updated tests to expect error objects with error messages
src/types.ts Extended types for safe hashes to include TxHashError
src/safe-hashes/schema.ts Added TxHashError interface
src/safe-hashes/Safetxhashes.ts Introduced retry logic and improved timeout handling for script execution
src/notifications/Telegram.ts Updated notification sender to accept union type for safe hashes
src/notifications/Slack.ts Refined Slack message formatting for error handling in safe hashes
src/notifications/NotificationSender.ts Changed argument types to include TxHashError
src/SafeWatcher.ts Updated safe hash processing with more robust error handling
package.json Added file for test coverage
Dockerfile Installed additional dependencies for enhanced shell compatibility

Comment thread src/SafeWatcher.ts
return parseResponse(safeTxHashesResult.data);
} catch (error) {
this.#logger.error({ error }, "Failed to parse SafeTxHashes response");
return { message: "Failed to parse SafeTxHahes response" };
Copy link

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a typo 'SafeTxHahes' which should be corrected to 'SafeTxHashes' for consistency.

Suggested change
return { message: "Failed to parse SafeTxHahes response" };
return { message: "Failed to parse SafeTxHashes response" };

Copilot uses AI. Check for mistakes.
@bernacodesido bernacodesido merged commit 83e9e91 into rootstock Jun 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants