Skip to content

Commit db387cf

Browse files
Add extra error codes
1 parent 2fd497f commit db387cf

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/Octopus.OpenFeature.Provider.SpecificationTests/FixtureEvaluationTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ static EvaluationContext BuildContext(Dictionary<string, string>? context)
4747

4848
static ErrorType MapErrorCode(string? errorCode) => errorCode switch
4949
{
50+
"PROVIDER_NOT_READY" => ErrorType.ProviderNotReady,
5051
"FLAG_NOT_FOUND" => ErrorType.FlagNotFound,
52+
"PARSE_ERROR" => ErrorType.ParseError,
53+
"TYPE_MISMATCH" => ErrorType.TypeMismatch,
54+
"TARGETING_KEY_MISSING" => ErrorType.TargetingKeyMissing,
55+
"INVALID_CONTEXT" => ErrorType.InvalidContext,
56+
"PROVIDER_FATAL" => ErrorType.ProviderFatal,
57+
"GENERAL" => ErrorType.General,
5158
null => ErrorType.None,
5259
_ => ErrorType.General
5360
};

src/Octopus.OpenFeature.Provider/Octopus.OpenFeature.Provider.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@
3434
</AssemblyAttribute>
3535
</ItemGroup>
3636

37+
<ItemGroup>
38+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
39+
<_Parameter1>Octopus.OpenFeature.Provider.SpecificationTests</_Parameter1>
40+
</AssemblyAttribute>
41+
</ItemGroup>
42+
3743
</Project>

src/Octopus.OpenFeature.Provider/OctopusFeatureConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public OctopusFeatureConfiguration(string clientIdentifier, ProductMetadata prod
1515
ServerUri = serverUri is not null ? new Uri(serverUri) : new Uri(DefaultServerUri);
1616
}
1717

18-
public Uri ServerUri { get; set; }
18+
internal Uri ServerUri { get; set; }
1919

2020
/// <summary>
2121
/// Overrides the application release version embedded in the ClientIdentifier

0 commit comments

Comments
 (0)