Closed zabeen closed 6 months ago
@zabeen, as far I understood, currently exception is suppressed and only exception message is written to AI without stacktrace. Do you want keep it as is but extend AI trace message with stack trace OR make throw it upper to allow AI catch it and log an exception?
@SergeyEzh
As discussed over teams, stack trace isn't useful here as we know exactly what causes EmptyDonorFileException
to be thrown (underlying file stream is null
).
Further, I see three places in code where EmptyDonorFileException
is being thrown and caught:
and in each case the stack trace is being written to the alert
message without file name.
So I am extending this ticket to cover all these cases.
@zabeen, I was doing final testing before commit and now alert message is confusing me. Because it states that file was found but it is empty, though I found that this exception is thrown when I put wrong url to blob to service bus message. When I upload 'real' empty file to blob storage and put correct blob url in service bus it just reads empty file and throws no exception.
@SergeyEzh In real usage, I have only seen this error where a file was dropped into blob storage, which caused an import request message to be published, and then user manually deleted the file from storage before the donor import app imported it. The blob stream generated by the function is null
and then hits the "empty file" exception (which is really a "missing file").
I am surprised an actual empty file doesn't result in any exception though. Perhaps the check that throws the EmptyDonorFileException
needs to be extended to stream is null or empty
?
@zabeen, I would prefer two messages like 'Unable to read file content' in case stream is null and 'The file contains no data' in case no data parsed from stream, rather than checking stream length.
I would prefer two messages like 'Unable to read file content' in case stream is null and 'The file contains no data' in case no data parsed from stream, rather than checking stream length.
@SergeyEzh I'll create a new ticket for that work, right now I want to close and deploy this ticket with the existing support enhancement.
donor-import-file-uploads
for that file, manually delete the donor import file from the blob storage container.Repeat same test with:
@zabeen Feature testing status: Ok
Regression testing status: Ok
Description
needs to be changed.Description
should list the name of the donor ID checker file that failed.Update:
EmptyDonorFileException
null
, so stack trace is not useful