mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-01-31 15:19:12 +00:00
Improve "Requested resource does not exist" exception message to give slightly more context
This commit is contained in:
@@ -51,7 +51,7 @@ namespace DiscordChatExporter.Core.Discord
|
||||
{
|
||||
HttpStatusCode.Unauthorized => DiscordChatExporterException.Unauthorized(),
|
||||
HttpStatusCode.Forbidden => DiscordChatExporterException.Forbidden(),
|
||||
HttpStatusCode.NotFound => DiscordChatExporterException.NotFound(),
|
||||
HttpStatusCode.NotFound => DiscordChatExporterException.NotFound(url),
|
||||
_ => DiscordChatExporterException.FailedHttpRequest(response)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ Failed to perform an HTTP request.
|
||||
internal static DiscordChatExporterException Forbidden() =>
|
||||
new("Access is forbidden.");
|
||||
|
||||
internal static DiscordChatExporterException NotFound() =>
|
||||
new("Requested resource does not exist.");
|
||||
internal static DiscordChatExporterException NotFound(string resourceId) =>
|
||||
new($"Requested resource ({resourceId}) does not exist.");
|
||||
|
||||
internal static DiscordChatExporterException ChannelIsEmpty() =>
|
||||
new("No messages found for the specified period.");
|
||||
|
||||
Reference in New Issue
Block a user