Skip to content

How to report errors after streaming has started? #341

Open
@jblashka

Description

@jblashka

I ran into lightblue-platform/lightblue-mongo#381 earlier, which caused my stream to return no results. But the client didn't throw an exception or indicate to me in any way that there was an error the occurred while processing the results. All I saw was that my streaming query resulted in no documents returned, but when I stepped through the query execution with a debugger I saw that the returned JSON contained:

...errors":[{"objectType":"error","context":"rest/FindCommand/containerImageRPMManifest/findAndStream(containerImageRPMManifest:1.0.0-SNAPSHOT)/mongo:find","errorCode":"mongo-crud:TooManyResults","msg":"17581"}]}

If I wasn't actively watching the results from my query and I wasn't aware that this query should have had results, I wouldn't have known there was a problem. Without setting some error flag or throwing some exception I'm concerned that some error while streaming results could occur and it would be silently consumed by lightblue and there'd be no way to report that an error occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions