ort icon indicating copy to clipboard operation
ort copied to clipboard

FossID: improve the error reporting when the credentials are wrong

Open nnobelis opened this issue 9 months ago • 0 comments

Following the discussion at https://github.com/oss-review-toolkit/ort/discussions/8591, it appears that, when the credentials to FossID (user and API key) are wrong, it is hard for the user to see that this is the cause of the failure.

13:38:31.582 [main] INFO  org.ossreviewtoolkit.plugins.scanners.fossid.FossId - Found project name 'gaia-bhthree' in URL https://github.com/esa/gaia-bhthree.git.
Exception in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `org.ossreviewtoolkit.clients.fossid.model.Project` from Array value (token `JsonToken.START_ARRAY`)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 61] (through reference chain: org.ossreviewtoolkit.clients.fossid.EntityResponseBody["data"])
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)

getProject is the first authentified call to FossID. Any authentication failure here should be handled and reported accordingly.

nnobelis avatar Apr 30 '24 09:04 nnobelis