You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling IDiscordRestChannelAPI#GetChannelMessageAsync with a message id of an auto mod action such as:
returns a result whose Error is set to an ExceptionError.
The error:
ExceptionError
{
Message = Failed to deserialize an enumeration value.,
Exception = System.Text.Json.JsonException: Failed to deserialize an enumeration value.
at Remora.Rest.Json.StringEnumConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.Read[TValue](Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](Utf8JsonReader& reader, JsonSerializerOptions options)
at Remora.Rest.Json.Internal.OptionalConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize(Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)
at Remora.Rest.Json.Internal.BoundDataObjectConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize(Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)
at Remora.Rest.Json.Internal.BoundDataObjectConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
at Remora.Rest.RestHttpClient`1.UnpackResponseAsync[TEntity](HttpResponseMessage response, String jsonPath, Boolean allowNullReturn, CancellationToken ct)
at Remora.Rest.RestHttpClient`1.UnpackResponseAsync[TEntity](HttpResponseMessage response, String jsonPath, Boolean allowNullReturn, CancellationToken ct)
at Remora.Rest.RestHttpClient`1.GetAsync[TEntity](String endpoint, String jsonPath, Action`1 configureRequestBuilder, Boolean allowNullReturn, CancellationToken ct)
}
Steps to Reproduce
Call IDiscordRestChannelAPI#GetChannelMessageAsync with message id of a Discord's auto mod action
Inspect the returned Result's Error
Expected Behavior
The method to return a successful Result<IMessage> with a valid Entity.
Current Behavior
A Result<IMessage> with the Error property set to ExceptionError is returned.
Description
Calling
IDiscordRestChannelAPI#GetChannelMessageAsync
with a message id of an auto mod action such as:returns a result whose
Error
is set to anExceptionError
.The error:
Steps to Reproduce
IDiscordRestChannelAPI#GetChannelMessageAsync
with message id of a Discord's auto mod actionResult
'sError
Expected Behavior
The method to return a successful
Result<IMessage>
with a validEntity
.Current Behavior
A
Result<IMessage>
with theError
property set toExceptionError
is returned.Library / Runtime Information
Remora.Discord.API:
73.0.0-github4632897105
Remora.Discord.API.Abstractions:
77.0.0-github4632897105
The text was updated successfully, but these errors were encountered: