search icon indicating copy to clipboard operation
search copied to clipboard

ccMixter search incorrect data response resolved

Open SisiVero opened this issue 1 year ago • 1 comments

Fixes

  • Fixes #250 by @Netacci

Description

Issue: An error was encountered when attempting to include zero as a license type in the rights variable for queries to the ccMixter API. The query string that included zero resulted in an invalid request, leading to an error response from the API.

Cause: The ccMixter API does not recognize zero as a valid license type in its query format. As zero was causing the error, the issue was identified to be a misrepresentation of the license type.

Solution: To resolve this issue, I replaced zero with cc0 in the query string. The updated code now correctly handles the public domain license type, avoiding any query errors.

Changes made:

  1. Replaced zero with cc0 to properly represent the public domain license type.
  2. Ensured that the query string is formatted correctly for the ccMixter API.

Tests

  1. After updating the license type in the query string, I tested the API request to verify that the error was resolved and the request was successful.
  2. The API now responds correctly with the expected results when cc0 is used instead of zero.

Screenshots

workingCCmixter

Checklist

  • [x] My pull request has a descriptive title (not a vague title like Update index.md).
  • [x] My pull request targets the default branch of the repository (main or master).
  • [x] My commit messages follow [best practices][best_practices].
  • [x] My code follows the established code style of the repository.
  • [x] I added or updated tests for the changes I made (if applicable).
  • [ ] I added or updated documentation (if applicable).
  • [x] I tried running the project locally and verified that there are no visible errors.

SisiVero avatar Oct 10 '24 09:10 SisiVero

Deploy Preview for cc-search-portal ready!

Name Link
Latest commit 25b7f7f61d65a5b5d2010665700f5a4c472a5409
Latest deploy log https://app.netlify.com/sites/cc-search-portal/deploys/670f8dc063b33a0008510966
Deploy Preview https://deploy-preview-285--cc-search-portal.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 10 '24 09:10 netlify[bot]

@SisiVero If you respond to #250 I can assign you for credit.

possumbilities avatar Apr 24 '25 16:04 possumbilities

Thank you for this! Approved.

You're welcome

SisiVero avatar Apr 24 '25 18:04 SisiVero