Hi,
As part of our design, we need to capture all the error codes on the design for future references. This includes custom application and mender client/server side errors.
Hence, I would like to know, how I can get the error codes (i.e. possible errors with its meaning) for the mender (client side is a MUST and server side error codes need to be known,if any).
Any header file or document which have all the error codes are OK for my purpose.
@kacf, I believe the Mender client have its own error handling apart from the HTTP/S error codes. Please correct me If I’m wrong.
I’m looking for the possible errors and it’s handling both in Mender client application and on the server communication (which I will get from API documentation).
I’m still not certain what you are asking. Of course the client has a lot of error handling, but only in response to various system calls and their errors. There is no document describing every error that can happen. In fact, we probably don’t know, because the kernel and libc and various other components may return different errors depending on which version you are running exactly.
There are very few errors that the client treats specially though. Most of them are just treated as fatal, with a few exceptions (EOF and NotExist errors are typical exceptions). Searching for “err != nil” in the source code should give a decent (but definitely not complete) picture of all the error handling in the client.