SyntaxError Unexpected token u in JSON at position 0 with mutations
I'm trying to use trpc client to await a mutation and just keep getting this error. everything works if i change the mutations into queries
6 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i'll send more info tomorrow
@oscartbeaumont i went back to working on this and here is more information. this user.auth works as a query, but when switched to a mutation it breaks with these errors. i am using the client api




it seems like the "u" in the json error is referring to undefined somewhere, but the payload is sending correctly

the links and transformer

i had a middleware that was assuming requests were queries and parsing the input json. that caused issues when using mutations