Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Explain" block attempts a POST request that returns a 405 (method not allowed) status when attempting to explain code #78

Open
lperezmo opened this issue Mar 25, 2023 · 0 comments

Comments

@lperezmo
Copy link

When using the "Explain" block, which is supposed to explain code using ML, it returns a blank response. The reason for this is that it's trying to make POST request that returns a 405 response (method not allowed).

The endpoint it is trying to reach is "https://blocks-sandbox.githubnext.com/api/explain", one possible cause is that you have to remove the 'sandbox' part from it.

Some other reasons why this might be happening might be:

  • The server does not accept POST requests to that URL or there’s a redirect involved converting the request to a GET.
  • Your browser is making a preflight request, which uses the OPTIONS HTTP method. This is to check whether the server will allow the POST request (the 405 status code is sent in the response to the OPTIONS request, not the POST request).
  • The POST method might not be allowed on which you are sending the request and the request is simply denying you to make any POST request by sending 405 error response

See the screenshots below for more details.

Screenshot of the POST request that's not being allowed

post_request_not_allowed

Example 'blank' response returned by the explanation block

code_to_be_explained

The 'Explain' block

explain_block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant