Skip to content

[BUG] In-Memory Provider throws exception #441

@askpt

Description

@askpt

Observed behavior

The InMemory provider is throwing an exception here:

throw new TypeMismatchException($"flag {flagKey} is not of type {typeof(T)}");
.

We should move from throwing exceptions to returning an ErrorType with a default value. Something like:

return new ResolutionDetails<T>(flagKey, defaultValue, ErrorType.TypeMismatch, Reason.Error, $"flag {flagKey} is not of type {typeof(T)}");

Expected Behavior

The In Memory provider doesn't throw any exceptions, and all unit tests pass.

Steps to reproduce

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions