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
In gosdk this structure should be used everywhere possible especially when it comes to response gosdk gives to other tools that is using it. Somewhere golang's standard errors package is used, somewhere errors.Throw is used, somewhere above structure is used.
Improper error response should be modified too. For example, on downloadFile function, if all blobbers returns error response then error returned by gosdk is File content didn't match with the content uploaded. We can't make anything out of it as it is ambiguous.
This inconsistency makes it harder to handle errors for tools using gosdk.
Please also check for draft PR. Having constants as error code is standard practice.
We have errors repo. Its error format is:
In gosdk this structure should be used everywhere possible especially when it comes to response gosdk gives to other tools that is using it. Somewhere golang's standard errors package is used, somewhere errors.Throw is used, somewhere above structure is used.
Improper error response should be modified too. For example, on downloadFile function, if all blobbers returns error response then error returned by gosdk is
File content didn't match with the content uploaded
. We can't make anything out of it as it is ambiguous.This inconsistency makes it harder to handle errors for tools using gosdk.
Please also check for draft PR. Having constants as error code is standard practice.
We can take references from popular repos.
The text was updated successfully, but these errors were encountered: