Troubleshooting 405 Error with Typesense Local Install

TLDR Digamber needed help troubleshooting a 405 error while trying to create a collection on a local Typesense install. Kishore Nallan suspected a bad HTTP query and Digamber confirmed the issue was a malformed URL.

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:38:30 UTC

Hi guys, looking for some help I’m trying to run a local install of typesense. When I try to create a collection i’m getting 405 => Method Not Allowed response.

Photo of Kishore Nallan
Kishore Nallan
Thu, 23 Dec 2021 10:40:34 UTC

What is the exact response text?

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:40:55 UTC

That is the exact response text

Photo of Kishore Nallan
Kishore Nallan
Thu, 23 Dec 2021 10:41:13 UTC

What client are you using?

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:41:29 UTC

I’m doing curl requests

Photo of Kishore Nallan
Kishore Nallan
Thu, 23 Dec 2021 10:42:01 UTC

Can you post the exact command here?

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:42:44 UTC

Just a note - it works when I use cloud deployment

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:42:50 UTC

just not with local install

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:45:12 UTC

I’m using wp_remote_request function which is a WordPress specific function to make requests So i don’t know exactly what you would need here ?

Photo of Kishore Nallan
Kishore Nallan
Thu, 23 Dec 2021 10:46:11 UTC

Typesense doesn't really return 405 during logical validation, so I suspect some bad http query being sent which is getting rejected.

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:47:33 UTC

Ah - i think that helps

Photo of Digamber
Digamber
Thu, 23 Dec 2021 10:47:45 UTC

Will check and get back to you

Photo of Digamber
Digamber
Thu, 23 Dec 2021 11:12:14 UTC

Kishore Nallan - thanks for your help - the 405 response was due to a malformed url

Photo of Kishore Nallan
Kishore Nallan
Thu, 23 Dec 2021 11:13:13 UTC

:+1: