Skip to content

Update curl extension #18931

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ridemountainpig
Copy link
Contributor

Description

Enhanced the detail of the request error message displayed in the toast. Close #18923.

Screencast

curl 2025-05-03 at 20 32 48

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: curl Issues related to the curl extension OP is contributor The OP of the PR is a contributor of the extension labels May 3, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented May 3, 2025

Thank you for your contribution! 🎉

🔔 @jonathangiardino @pernielsentikaer @bkeys818 you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances error handling in the cURL extension by adding detailed error messages from API responses when requests fail, improving debugging capabilities.

  • Improved error message extraction in Form.tsx by checking multiple error response fields (message, error, detail) and displaying them in the toast notification
  • Added new changelog entry correctly formatted with {PR_MERGE_DATE} template at the top of CHANGELOG.md
  • Consider using showFailureToast from @raycast/utils instead of manual showToast for error handling
  • The error message extraction could be simplified by using optional chaining for nested properties

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

This PR updates dependencies in the cURL extension and further improves error handling implementation with modern React and Raycast API versions.

  • Updated @raycast/api to ^1.94.0 and @raycast/utils to ^1.19.1 in package.json for improved error handling capabilities
  • Added React 18.2.0 as a direct dependency to ensure consistent React version usage
  • Upgraded Node and React type definitions to latest versions for better TypeScript support
  • Removed Swift-related build files from tracking in .gitignore

The changes focus on modernizing the extension's dependencies while maintaining the improved error handling functionality from the previous review.

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +8 to +10
.swiftpm
compiled_raycast_swift
Copy link
Contributor

Choose a reason for hiding this comment

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

style: These Swift-related ignore patterns seem unnecessary for a JavaScript/TypeScript cURL extension. Consider removing them if Swift functionality is not being used.

Suggested change
.raycast-swift-build
.swiftpm
compiled_raycast_swift

@pernielsentikaer
Copy link
Collaborator

Hi @ridemountainpig👋

Thanks for your contribution 🔥

@jonathangiardino do you want to check this?

@pernielsentikaer pernielsentikaer self-assigned this May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: curl Issues related to the curl extension extension fix / improvement Label for PRs with extension's fix improvements OP is contributor The OP of the PR is a contributor of the extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cURL] Allow to read error response body
3 participants