-
Notifications
You must be signed in to change notification settings - Fork 6
IsIdentifiable may generate messages that cause CohortPackager to crash #1778
Copy link
Copy link
Open
Labels
Description
Specifically when an exception is generated here:
SmiServices/src/microservices/Microservices.IsIdentifiable/Service/IsIdentifiableQueueConsumer.cs
Line 68 in e5da6b3
| SendVerificationMessage(statusMessage, header, tag, VerifiedFileStatus.ErrorWontRetry, $"Exception while classifying {statusMessage.GetType().Name}:\n{e}. File could not be scanned."); |
The verification message report content is not a JSON blob of failure data but is a serialised exception message. CohortPackager does not handle this case though:
Lines 77 to 86 in e5da6b3
| try | |
| { | |
| // Check the report contents are valid here, since we just treat it as a JSON string from now on | |
| _ = JsonConvert.DeserializeObject<IEnumerable<Failure>>(message.Report); | |
| } | |
| catch (JsonException e) | |
| { | |
| ErrorAndNack(header, tag, "Could not deserialize message report to Failure object", e); | |
| return; | |
| } |
Reactions are currently unavailable