nylas/nylas-python

Consistent error message for APIClient.api_server

Closed this issue · 0 comments

When you instantiate an APIClient with a custom api_server argument, the constructor checks if the api_server contains the string ://. However, if it doesn't, the error message states "When overriding the Nylas API server address, you must include https://".

This error message is inconsistent -- it's possible to create an APIClient with an api_server value of http://example.com, even though that uses insecure HTTP instead of secure HTTPS. The check should be made consistent with the error message, which could mean either changing the check or changing the message.