mirror of
https://github.com/TheRealOwenRees/plantid-discord-bot.git
synced 2026-07-23 04:26:57 +00:00
error log updates
This commit is contained in:
@@ -51,6 +51,7 @@ defmodule PlantIdDiscordBot.Cog.PlantNet do
|
||||
})
|
||||
end
|
||||
|
||||
# TODO remove
|
||||
Logger.debug(saved_images)
|
||||
|
||||
# TODO use actual image data
|
||||
@@ -74,10 +75,15 @@ defmodule PlantIdDiscordBot.Cog.PlantNet do
|
||||
})
|
||||
|
||||
{:ok, %HTTPoison.Response{status_code: 400}} ->
|
||||
Logger.error("Malformed request sent to the PlantNet API")
|
||||
Logger.error("""
|
||||
Malformed request sent to the PlantNet Api from PlantIdDiscordBot.Cog.PlantNet.do_identification
|
||||
Query URI: #{query_uri}
|
||||
Status Code: 400
|
||||
Response Body: #{String.slice(body, 0..500)}... (truncated)
|
||||
""")
|
||||
|
||||
Api.create_followup_message(interaction.application_id, interaction.token, %{
|
||||
content: "Bad Request"
|
||||
content: "Bad Request. This error has been logged."
|
||||
})
|
||||
|
||||
{:ok, %HTTPoison.Response{status_code: 404}} ->
|
||||
|
||||
Reference in New Issue
Block a user