Why does my webhook gets a 500 as soon as I publish the endpoint? (Build plan)

Options
Jean Sam
Jean Sam Member
edited October 2023 in ? Help! I'm a Noob

Hello,

I'm sending a post webhook via Postman. When I go to the request history of my endpoint I get a "200 OK" result.

Then I publish the endpoint. I post the exact same call from Postman, and I get a "500 internal server error" - although I do receive the data from Postman. I'm surely missing something obvious, but I not sure what! I'm quite new at Xano. Does it have something to do with the fact that I'm on the free plan?

Thanks for any clue you may have

Answers

  • Cameron B
    Cameron B Member, Administrator

    ADMIN

    Options

    Hmm - would you mind posting some screenshots to see what we're dealing with?

    It's a good rule of thumb to include a content-type of application/json.

    Also, what method are you using? GET, POST? What params are we sending?

    Lastly, to clear most things up, what does your request history say? That is, in the top-right-hand corner of the endpoint, tap those three dots → request history.

    This should point us in the right direction!

  • Jean Sam
    Jean Sam Member
    edited October 2023
    Options

    Hi Cameron, thanks for the quick answer!

    I've tried again, so here is what I see from the request history tab. The only thing I've changed between the 200 and the 500 ones is that I published the endpoint.






    Here is the endpoint (not sure it can get any simpler than that):

    And fyi here is my Post call from Postman, which I haven't changed at all (again, it triggered a 200 as long as the endpoint was in draft), so I guess the fix is rather on the Xano side

    And here are the default Postman headers:

  • Cameron B
    Cameron B Member, Administrator

    ADMIN

    Options

    When you click on the request history with the 500 - looking inside the output, what does it say?

  • Jean Sam
    Jean Sam Member
    Options

    It says "unable to decode input". Interesting that for the one that works (when in draft), i don't have any output.

  • Cameron B
    Cameron B Member, Administrator

    ADMIN

    Options

    The output is just the actual message being outputted - it's not the actual output. In this case, the input being sent is being sent in such a way that the system can't accurately understand it. Mind posting an example of what you're sending?

  • Jean Sam
    Jean Sam Member
    Options

    Hi Cameron, thanks for staying with me! :)
    Mmmh what i'm sending is shown in the 2 Postman screenshots in my previous post (Headers and body). Did you allude to anything else?