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

Improve error handling and validation for Maven resources #184

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

gastaldi
Copy link
Collaborator

@gastaldi gastaldi commented Mar 31, 2023

[src/test/java/io/quarkus/registry/app/services/MavenResourceTest.java]

  • Change return status code from 400 to 404 for requests with invalid version
  • Change return status code from 400 to 404 for requests with invalid snapshot version
  • Change return status code from 400 to 404 for requests with invalid version in sha1 file
  • Change return status code from 400 to 404 for requests with invalid snapshot version in sha1 file
  • Remove test for inexistent platforms
  • Update test for
    [src/main/java/io/quarkus/registry/app/maven/PlatformsContentProvider.java]
  • Change the response status from NO_CONTENT to NOT_FOUND when no platforms are found
    [src/main/java/io/quarkus/registry/app/util/Version.java]
  • Require major, minor, and incremental versions to be larger than 0 for validation

- Update status codes for invalid requests
- Remove test for inexistent platforms
- Update test for platforms
- Require all version numbers to be larger than 0 for validation
- Fixes #183

[src/test/java/io/quarkus/registry/app/services/MavenResourceTest.java]
- Change return status code from `400` to `404` for requests with invalid version
- Change return status code from `400` to `404` for requests with invalid snapshot version
- Change return status code from `400` to `404` for requests with invalid version in sha1 file
- Change return status code from `400` to `404` for requests with invalid snapshot version in sha1 file
- Remove test for inexistent platforms
- Update test for
[src/main/java/io/quarkus/registry/app/maven/PlatformsContentProvider.java]
- Change the response status from `NO_CONTENT` to `NOT_FOUND` when no platforms are found
[src/main/java/io/quarkus/registry/app/util/Version.java]
- Require major, minor, and incremental versions to be larger than 0 for validation
@gastaldi gastaldi requested a review from aloubyansky March 31, 2023 00:34
@gastaldi gastaldi merged commit 20b8e92 into main Mar 31, 2023
@gastaldi gastaldi deleted the 404_on_missing_platforms branch March 31, 2023 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
2 participants