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
Describe the bug create-message!'s message-reference expects the key :message_id while the error for using the key :message-id says that :message-id is missing, leaving the user guessing what's wrong with their code.
#error {
:cause Attempted to send an invalid message payload
:data {:message Invalid Form Body, :code 50035, :errors {:message-reference {:message-id {:-errors [{:code BASE_TYPE_REQUIRED, :message This field is required}]}}}}
Version Information
Clojure Version: 1.11.1
Discljord Version:1.3.1
OS bot is hosted on: arch linux / clojure:temurin-21-lein docker
To Reproduce
Steps to reproduce the behavior:
to get the error (discljord.messaging/create-message! conn channel-id :message-reference {:message-id message-id} :content "test")
to get it working (discljord.messaging/create-message! conn channel-id :message-reference {:message_id message-id} :content "test")
Expected behavior
Either the key needed needs to be :message-id like the error states, or the error should state the key missing is :message_id.
(personally, I think the first is the right way, given almost everything is clojurized anyway...)
Logs
#error {
:cause Attempted to send an invalid message payload
:data {:message Invalid Form Body, :code 50035, :errors {:message-reference {:message-id {:-errors [{:code BASE_TYPE_REQUIRED, :message This field is required}]}}}}
:via
[{:type clojure.lang.ExceptionInfo
:message Attempted to send an invalid message payload
:data {:message Invalid Form Body, :code 50035, :errors {:message-reference {:message-id {:-errors [{:code BASE_TYPE_REQUIRED, :message This field is required}]}}}}
:at [discljord.messaging.impl$send_message_BANG_ invokeStatic impl.clj 169]}]
:trace
[[discljord.messaging.impl$send_message_BANG_ invokeStatic impl.clj 169]
[discljord.messaging.impl$send_message_BANG_ invoke impl.clj 152]
[discljord.messaging.impl$eval11096$fn__11098 invoke impl.clj 187]
[clojure.lang.MultiFn invoke MultiFn.java 239]
[discljord.messaging.impl$make_request_BANG_$make_request__14028 invoke impl.clj 1140]
[discljord.messaging.impl$make_request_BANG_ invokeStatic impl.clj 1145]
[discljord.messaging.impl$make_request_BANG_ invoke impl.clj 1119]
[discljord.messaging.impl$step_agent$fn__14052 invoke impl.clj 1190]
[clojure.core$binding_conveyor_fn$fn__5823 invoke core.clj 2050]
[clojure.lang.AFn applyToHelper AFn.java 154]
[clojure.lang.RestFn applyTo RestFn.java 132]
[clojure.lang.Agent$Action doRun Agent.java 114]
[clojure.lang.Agent$Action run Agent.java 163]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1144]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 642]
[java.lang.Thread run Thread.java 1583]]}
The text was updated successfully, but these errors were encountered:
Describe the bug
create-message!
'smessage-reference
expects the key:message_id
while the error for using the key:message-id
says that:message-id
is missing, leaving the user guessing what's wrong with their code.Version Information
To Reproduce
Steps to reproduce the behavior:
(discljord.messaging/create-message! conn channel-id :message-reference {:message-id message-id} :content "test")
(discljord.messaging/create-message! conn channel-id :message-reference {:message_id message-id} :content "test")
Expected behavior
Either the key needed needs to be
:message-id
like the error states, or the error should state the key missing is:message_id
.(personally, I think the first is the right way, given almost everything is clojurized anyway...)
Logs
The text was updated successfully, but these errors were encountered: