suggest defining server_url if it is undefined and a 401 is returned
Coniferish opened this issue · comments
John commented
Same issue as was opened in the unstructured-python-client repo: Unstructured-IO/unstructured-python-client#30
- If no server_url is passed and a 401 is returned from the freemium api, they may be a SaaS user with a valid key. Suggest to the user that they may need to enter a custom url.
This will be custom logic on top of the autogenerated code. Speakeasy will provide hooks to do this soon, but for now we should establish a pattern, and maintain this code whenever a pr is regenerated.
See solution here: Unstructured-IO/unstructured-python-client#35