mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-22 10:55:15 -04:00
Improve "Requested resource does not exist" exception message to give slightly more context
This commit is contained in:
parent
2ab6773c17
commit
35264e8a12
2 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ namespace DiscordChatExporter.Core.Discord
|
||||||
{
|
{
|
||||||
HttpStatusCode.Unauthorized => DiscordChatExporterException.Unauthorized(),
|
HttpStatusCode.Unauthorized => DiscordChatExporterException.Unauthorized(),
|
||||||
HttpStatusCode.Forbidden => DiscordChatExporterException.Forbidden(),
|
HttpStatusCode.Forbidden => DiscordChatExporterException.Forbidden(),
|
||||||
HttpStatusCode.NotFound => DiscordChatExporterException.NotFound(),
|
HttpStatusCode.NotFound => DiscordChatExporterException.NotFound(url),
|
||||||
_ => DiscordChatExporterException.FailedHttpRequest(response)
|
_ => DiscordChatExporterException.FailedHttpRequest(response)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,8 @@ Failed to perform an HTTP request.
|
||||||
internal static DiscordChatExporterException Forbidden() =>
|
internal static DiscordChatExporterException Forbidden() =>
|
||||||
new("Access is forbidden.");
|
new("Access is forbidden.");
|
||||||
|
|
||||||
internal static DiscordChatExporterException NotFound() =>
|
internal static DiscordChatExporterException NotFound(string resourceId) =>
|
||||||
new("Requested resource does not exist.");
|
new($"Requested resource ({resourceId}) does not exist.");
|
||||||
|
|
||||||
internal static DiscordChatExporterException ChannelIsEmpty() =>
|
internal static DiscordChatExporterException ChannelIsEmpty() =>
|
||||||
new("No messages found for the specified period.");
|
new("No messages found for the specified period.");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue