-
Notifications
You must be signed in to change notification settings - Fork 224
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
Provide better error handling for SDK error #794
Comments
Derek assign: me |
@viveksyngh do you have an update on this? |
@viveksyngh just checking in again now, as it's been quite a few months since this came up on the radar for you to work on. I also asked several months ago what your update was. Please can you take time to answer and keep us in the loop? Do you want someone else to take this? |
I will un-assign it and let it be open for someone else to take it. I will try to complete my current tasks and then comeback to this one. |
Ok, would you mind detailing a solution so that someone else could pick it up later? |
@alexellis I would like to work on this We need to discuss how we want to add different error types like auth error, build error, connection error etc. And can add different functions like:
for each. Please give your thoughts. |
Hi @NikhilSharmaWe for the time being we've worked around this and created a separate Go SDK: https://github.com/openfaas/go-sdk There are some additional methods we could add - perhaps check out the Swagger and suggest on this issue what's missing or could be added? https://github.com/openfaas/faas/blob/master/api-docs/swagger.yml The Swagger also wasn't updated for namespaces support in OpenFaaS for Enterprises, so that could be something you could add to the Swagger in a separate PR - including the list namespaces endpoint. Alex |
Provide a better way to check for the errors returned by SDK function.
Expected Behaviour
Create custom error package with types/methods for different errors returned by SDK, which will allows users to check for specific errors as below
Current Behaviour
Right now these checks can be performed using string matching with error messages
Possible Solution
Steps to Reproduce (for bugs)
Context
Your Environment
FaaS-CLI version ( Full output from:
faas-cli version
):Docker version ( Full output from:
docker version
):Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
Operating System and version (e.g. Linux, Windows, MacOS):
Link to your project or a code example to reproduce issue:
The text was updated successfully, but these errors were encountered: