-
Notifications
You must be signed in to change notification settings - Fork 3
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
Response code 500 for mistyped or missing license in the Compatibility Matrix. #2
Comments
Unknown resources are generally reported with 404 errors and not 500 which is generally used more for really invalid input (which is not the case here since the license is most probably a valid one, but the server can hardly know all the licenses that exist) or unexpected server side problems. That means that on Maven plugin side I could print a warning about the licenses that could not be taken into account in the result instead of totally making it impossible to validate at least the known ones. |
@tmortagne |
Not really sure what you mean by "print". What is needed from the REST API is:
|
@tmortagne Sorry, I didn't mention My point is that we can provide the list of the supported licenses just by looking at the compatibility matrix. Printing a warning (as you mentioned in the first reply), including the licenses supported, would make more sense. Furthermore, as I explained, if the Matrix is updated with new licenses, the warning will follow the new Matrix structure. |
I don't think you understand what I suggested. I'm not asking the REST API to indicate the list of all the licenses that it does not support since that's obviously not possible, I'm just asking the REST API to indicate in the response which of the licenses that were sent in the request were taken or not into account. |
Now I got it. I will do my best to try to address your request. |
Dear Thomas @tmortagne, I managed to check upon missing or mistyped inbound and outbound licenses, providing the verbose endpoints with a log also related to these licenses. Still is open the issue to provide a 404 in some cases. But honestly, at the moment, I don't have in mind what other cases could be generating an error. I will close this issue whenever we are sure that, in any case, the REST APIs will provide an error. Thanks for your kind suggestions. |
I cannot think of anything else that an unknown outbound license. Looking forward to testing the new license validation API ! |
Also, the outbound license is handled. Well, as I mentioned before, these controls are made upon verbose REST API endpoints, namely, where details regarding each inbound are given. A few flag endpoints just provide
I would go for the first point, but please feel free to provide your suggestion. Sincerely, PS for testing the new APIs, I am waiting for @mir-am to deploy the |
This issue should be fixed by introducing a few functions that verify if a license is in the Matrix or not. |
@tmortagne
Dear Thomas, I noticed most of the API Endpoints for Maven projects provide 400 and 404 as error messages, and none of them has 500.
LCV REST APIs provide 500 response codes when a mistyped or missing license in the Compatibility Matrix is POSTed, in both inbound or outbound licenses.
From your perspective, should this be an issue to address?
Small update, I am working on adapting the LCV to read the full OSADL matrix .
The text was updated successfully, but these errors were encountered: