Skip to content
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

IsIdentifiable may generate messages that cause CohortPackager to crash #1778

Open
rkm opened this issue Mar 11, 2024 · 0 comments
Open

IsIdentifiable may generate messages that cause CohortPackager to crash #1778

rkm opened this issue Mar 11, 2024 · 0 comments
Labels
priority/high type/bug Something isn't working

Comments

@rkm
Copy link
Member

rkm commented Mar 11, 2024

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

@rkm rkm added the type/bug Something isn't working label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant