Skip to content

Conversation

@manisha1997
Copy link
Contributor

Fixes

Support 2xx and 3xx for delete status codes

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@manisha1997 manisha1997 requested a review from Copilot December 1, 2025 13:39
Copilot finished reviewing on behalf of manisha1997 December 1, 2025 13:42
Copy link

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 expands the acceptable HTTP status codes for delete operations in the Twilio REST framework to support all 2xx and 3xx status codes, rather than only returning success for 204 No Content responses. This aligns the delete method's behavior with the fetch method, which already accepts redirects (3xx codes).

Key Changes

  • Modified error threshold from >= 300 to >= 400 to accept 3xx redirect responses
  • Changed return value logic from checking specifically for 204 to accepting any 2xx/3xx status code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

Copilot AI commented Dec 1, 2025

@manisha1997 I've opened a new pull request, #767, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Add comprehensive tests for delete method with various status codes

Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>

* Add vendor/bundle to .gitignore and remove from repository

Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@manisha1997 manisha1997 merged commit 4d6cb7a into main Dec 4, 2025
26 of 27 checks passed
@manisha1997 manisha1997 deleted the support-all-status-codes-for-delete branch December 4, 2025 12:26
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