Detailed Description
When running the file-manager-client with out of scope token, the generated error message is not helpful.
Steps to produce the error message
- copy the following payload.json into your working directory
{
"analysisType": {
"name": "sequenceExperiment"
},
"studyId": "TEST_STUDY_002",
"data_category": "Genomics",
"submitter_analysis_id": "test_analysis_001",
"submitter_experiment_id": "test_experiment_001",
"files": [
{
"fileName": "test_file.fastq.gz",
"fileType": "FASTQ",
"fileSize": 25,
"fileMd5sum": "0d4dff58e1120c2984a779cc6b9ea3be",
"fileAccess": "controlled"
}
]
}
- run the following docker command
docker run -d -it \
--name pcgl-file-manager \
-e CLIENT_ACCESS_TOKEN=dummy_token \
-e CLIENT_STUDY_ID=TEST_STUDY_002 \
-e CLIENT_SERVER_URL=https://file-manager.pcgl-dev.cumulus.genomeinformatics.org/ \
--mount type=bind,source="$(pwd)",target=/output \
ghcr.io/overture-stack/song-client:822055be
- run the file-manager-client
docker exec pcgl-file-manager sh -c "sing submit -f /output/payload.json --allow-duplicates"
We get the following error message:
[main] ERROR b.o.s.c.c.ClientMain - {
"name" : "NullPointerException",
"message" : null,
"stackTrace" : [
"bio.overture.song.sdk.errors.ServerResponseErrorHandler.handleError(ServerResponseErrorHandler.java:61)",
"org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)",
"org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)",
"org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)",
"org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)",
"org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602)",
"bio.overture.song.sdk.web.impl.DefaultRestClient.post(DefaultRestClient.java:51)",
"bio.overture.song.sdk.web.impl.DefaultRetryRestClientDecorator.lambda$post$1(DefaultRetryRestClientDecorator.java:43)",
"org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329)",
"org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:209)",
"bio.overture.song.sdk.web.impl.DefaultRetryRestClientDecorator.post(DefaultRetryRestClientDecorator.java:43)",
"bio.overture.song.sdk.SongApi.submit(SongApi.java:54)",
"bio.overture.song.client.command.SubmitCommand.run(SubmitCommand.java:60)",
"bio.overture.song.client.cli.ClientMain.run(ClientMain.java:95)",
"bio.overture.song.client.Main.main(Main.java:30)",
"java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
"java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)",
"java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)",
"java.base/java.lang.reflect.Method.invoke(Unknown Source)",
"org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)",
"org.springframework.boot.loader.Launcher.launch(Launcher.java:108)",
"org.springframework.boot.loader.Launcher.launch(Launcher.java:58)",
"org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)"
]
Expectation
We expect the error message to be more informative to indicate the token issue.
Detailed Description
When running the file-manager-client with
out of scopetoken, the generated error message is not helpful.Steps to produce the error message
We get the following error message:
Expectation
We expect the error message to be more informative to indicate the token issue.