AutoGPT
AutoGPT copied to clipboard
fix(frontend): Fix Sentry httpClientIntegration bug with URL objects
Changes ποΈ
Fixes BUILDER-3QB. The issue was that: Sentry's fetch instrumentation failed to handle Next.js passing a URL object to fetch, incorrectly calling string method .includes().
- Wraps the
window.fetchfunction to convert URL objects to strings before passing them to Sentry's instrumentation. - This resolves the "url.includes is not a function" error caused by Sentry's httpClientIntegration not properly handling URL objects.
This fix was generated by Seer in Sentry, triggered automatically. ποΈ Run ID: 1749699
Not quite right? Click here to continue debugging with Seer.
Checklist π
For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
- [ ] Manually triggered the error by passing a URL object to fetch and confirmed that the fix resolves the issue.
Example test plan
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
For configuration changes:
- [ ]
.env.defaultis updated or already compatible with my changes - [ ]
docker-compose.ymlis updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
This PR targets the master branch but does not come from dev or a hotfix/* branch.
Automatically setting the base branch to dev.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Comment @coderabbitai help to get the list of available commands and usage tips.
Deploy Preview for auto-gpt-docs canceled.
| Name | Link |
|---|---|
| Latest commit | ec1ebb4d1dcecc791210b004ac09b853a80f6d67 |
| Latest deploy log | https://app.netlify.com/projects/auto-gpt-docs/deploys/68df9f8da495f10008ef1771 |
Here's the code health analysis summary for commits 8b4eb6f..ec1ebb4. View details on DeepSourceΒ β.
Analysis Summary
| Analyzer | Status | Summary | Link |
|---|---|---|---|
| β Β Success | View CheckΒ β | ||
| β Β Success | View CheckΒ β |
π‘ If youβre a repository administrator, you can configure the quality gates from the settings.
Thank you for submitting this PR to fix the Sentry issue with URL objects. The code change looks good and appropriately addresses the problem.
However, I noticed that the checklist in your PR description is not fully completed. Please check off all the relevant items in the checklist to confirm that:
- You have clearly listed your changes (this appears done but not checked)
- You have made a test plan
- You have tested your changes according to the test plan
You've already provided a good test plan (manually triggering the error by passing a URL object to fetch), but it needs to be checked off to indicate that you've completed this testing.
Once the checklist is properly completed, the PR will be ready to merge.
Thanks for this PR addressing the Sentry issue with URL objects in fetch calls.
The code change looks good and focused on solving the specific problem. The PR description explains the issue and solution clearly.
However, before this can be merged, please complete the checklist in the PR description by checking the following boxes:
- "I have clearly listed my changes in the PR description"
- "I have made a test plan"
You've actually provided this information in the description, but the checkboxes themselves need to be marked as completed. Once you've checked those boxes, this PR will be ready to merge.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.