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

Storage: Batch load example does not handle errors correctly #2551

Open
JurjenBiewenga opened this issue Mar 21, 2024 · 0 comments
Open

Storage: Batch load example does not handle errors correctly #2551

JurjenBiewenga opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples.

Comments

@JurjenBiewenga
Copy link

Currently the Batch load example just logs the AppendResult, but ignores the Error/RowErrors fields. This makes the log look like it succeeded and there were no issues appending your rows. Proposing that the example should be checking the Error field, if there's content, then log all errors relating to the appended rows. E.g. something like:

if (responseItem.Error != null)
{
    await Console.Error.WriteLineAsync($"Appending rows resulted in an error: {responseItem.Error.Message}");
    foreach (RowError rowError in responseItem.RowErrors)
        await Console.Error.WriteLineAsync(rowError.ToString());
}
@product-auto-label product-auto-label bot added api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples. labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples.
Projects
None yet
Development

No branches or pull requests

3 participants
@JurjenBiewenga @cojenco and others