Uwaa/Pleroma/Models/PleromaException.cs
2024-12-18 16:04:26 +00:00

31 lines
No EOL
752 B
C#

namespace Uwaa.Pleroma;
public class PleromaException : Exception
{
[JsonPropertyName("error")]
public string Text { get; set; } = null!;
public override string Message => Text;
public override string ToString() => Message;
}
public class PleromaAggregateException : Exception
{
[JsonPropertyName("errors")]
public PleromaInnerException[] Text { get; set; } = null!;
public override string Message => string.Join("\n", (object?[])Text);
public override string ToString() => Message;
}
public class PleromaInnerException : Exception
{
[JsonPropertyName("detail")]
public string Text { get; set; } = null!;
public override string Message => Text;
public override string ToString() => Message;
}