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
For the "Try It" feature, if the request takes more than 5 seconds to complete execution, the ApiDemoPanel will show a "Connection Failed" error.
Expected behavior
The ApiDemoPanel shows the response even if the request takes more than 5 seconds to complete
Current behavior
The ApiDemoPanel shows a "Connection Failed" error. The request actually completes its execution and returns a response (verified from the network tab)
Possible solution
The timeout is hardcoded in makeRequest.ts (line 15). If there is no specific reason for choosing that value, it can be increased to a higher timeout.
Another option is to add a new plugin config variable that let's the user choose a timeout value themselves.
Steps to reproduce
Can be reproduced by sending an API requesting in the ApiDemoPanel that takes more than 5 seconds to return a response.
Context
I am building the documentation for a text-to-speech API that sometimes takes a fair bit of time to generate a response. It would be awesome if the "Try it" feature worked for slower APIs too.
Your Environment
Version used: 1.2.1
The text was updated successfully, but these errors were encountered:
Hi @devgeetech, thanks for reporting this issue. I think a new plugin config option that allows users to configure the timeout makes sense. We'll add it to our backlog of feature requests.
@devgeetech, we recently improved support for swizzling OpenAPI docs theme components, including the makeRequest.ts module that handles generating the request. That said, it should be possible to swizzle in order to override the timeout.
Describe the bug
For the "Try It" feature, if the request takes more than 5 seconds to complete execution, the ApiDemoPanel will show a "Connection Failed" error.
Expected behavior
The ApiDemoPanel shows the response even if the request takes more than 5 seconds to complete
Current behavior
The ApiDemoPanel shows a "Connection Failed" error. The request actually completes its execution and returns a response (verified from the network tab)
Possible solution
The timeout is hardcoded in makeRequest.ts (line 15). If there is no specific reason for choosing that value, it can be increased to a higher timeout.
Another option is to add a new plugin config variable that let's the user choose a timeout value themselves.
Steps to reproduce
Can be reproduced by sending an API requesting in the ApiDemoPanel that takes more than 5 seconds to return a response.
Context
I am building the documentation for a text-to-speech API that sometimes takes a fair bit of time to generate a response. It would be awesome if the "Try it" feature worked for slower APIs too.
Your Environment
The text was updated successfully, but these errors were encountered: