Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: throwOnError and error message more descriptive #838

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

himanshu-dixit
Copy link
Collaborator

@himanshu-dixit himanshu-dixit commented Nov 7, 2024

Important

Enhance error handling and logging in the SDK by adding throwOnError in BackendClient, improving error messages, and logging API key usage.

  • Error Handling:
    • Add throwOnError: true in BackendClient configuration in backendClient.ts.
    • Change error code API_KEY_UNAVAILABLE to API_KEY_INVALID in error.ts.
    • Enhance error message details in CEG.handleError() in error.ts.
  • Logging:
    • Add logging for API key and base URL in Composio constructor in index.ts.
  • Misc:
    • Update version in package.json from 0.2.8-4 to 0.2.9-3.
    • Minor code cleanup in base.toolset.ts and index.ts.

This description was created by Ellipsis for 24056d1. It will automatically update as commits are pushed.

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 1:30pm

Copy link

sweep-ai bot commented Nov 7, 2024

Hey @himanshu-dixit, here are examples of how you can ask me to improve this pull request:

@Sweep Fix the CI errors.
@Sweep Add unit tests for the `BackendClient` class in `backendClient.ts` to verify the new `throwOnError: true` configuration, ensuring that errors are properly thrown when API requests fail.

📖 For more information on how to use Sweep, please read our documentation.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to f560e9f in 48 seconds

More details
  • Looked at 105 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. js/src/sdk/index.ts:47
  • Draft comment:
    The error code ERROR.COMMON.API_KEY_UNAVAILABLE should be updated to ERROR.COMMON.API_KEY_INVALID to match the changes in the ERROR object.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_DllmEbZC6or2ztYJ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Nov 7, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-11724003071/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-11724003071/html-report/report.html

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on a152201 in 30 seconds

More details
  • Looked at 57 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_53y4i4yv8gxVibwS


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 5433cbe in 47 seconds

More details
  • Looked at 153 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_DG8gyHOjycFILdCj


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

python/composio/cli/add.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 24056d1 in 19 seconds

More details
  • Looked at 22 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/composio/cli/add.py:94
  • Draft comment:
    Typo fix: Corrected 'lables' to 'labels'. Ensure similar typos are corrected elsewhere if present.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR description mentions a change from 'lables' to 'labels', which is a typo fix. This change is correctly implemented in the code.

Workflow ID: wflow_5ZaZQEJPTBUWTOOw


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@himanshu-dixit himanshu-dixit merged commit 1ad7d6f into master Nov 8, 2024
8 of 9 checks passed
@himanshu-dixit himanshu-dixit deleted the ft-change-js branch November 8, 2024 09:53
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.

2 participants