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

Permanent 400/white screen crash blocking the creation of Thunderbird releases #1530

Closed
gabrielBusta opened this issue Jul 22, 2024 · 0 comments · Fixed by #1532 · May be fixed by #1531
Closed

Permanent 400/white screen crash blocking the creation of Thunderbird releases #1530

gabrielBusta opened this issue Jul 22, 2024 · 0 comments · Fixed by #1532 · May be fixed by #1531
Labels
bug Something isn't working

Comments

@gabrielBusta
Copy link
Member

gabrielBusta commented Jul 22, 2024

Summary

API Endpoint: GET /releases

Error: "Wrong type, expected 'integer' for query parameter 'build_number'"

Note: This might be a regression caused by updating axios, which may have changed how it handles null/undefined parameters.

buildNumber = null

export async function getReleases(
params = null,
url = '/releases',
usePublicApi = true
) {
const res = await axios.get(url, {
params,
usePublicApi,
});
return res.data.reverse();
}

Description

When making a request to the GET /releases endpoint, the server returns a 400 Bad Request error if the build_number query parameter is provided as an empty string.

Steps to Reproduce

  1. Send a request to the /releases endpoint with the build_number query parameter as an empty string:
    GET /releases?product=thunderbird&branch=releases%2Fcomm-beta&version=&build_number=&status=shipped
    
  2. Get a 400 Bad Request response:
    {
      "detail": "Wrong type, expected 'integer' for query parameter 'build_number'",
      "status": 400,
      "title": "Bad Request",
      "type": "about:blank"
    }

Expected Behavior

The server should handle the empty string for the build_number parameter gracefully by interpreting it as if the parameter is not provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant