Skip to content

IsIdentifiable may generate messages that cause CohortPackager to crash #1778

@rkm

Description

@rkm

Specifically when an exception is generated here:

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:

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;
}

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions