Project

General

Profile

Actions

Bug #5836

closed

[API] Remote API error messages should make it clear that they are remote.

Added by Misha Zatsman about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Misha Zatsman
Category:
SDKs
Target version:
Story points:
0.5

Description

When the API server returns an error indicating that it is out of memory, the go sdk client code returns an error whose Error() method returns "#<NoMemoryError: failed to allocate memory>"

In addition to the actual error message returned by the server, it should also give context to indicate that this error message was returned by the api server, and might as well print the returned status and message too.

As stated in http://blog.golang.org/error-handling-and-go :

It is the error implementation's responsibility to summarize the context. The error returned by os.Open formats as "open /etc/passwd: permission denied," not just "permission denied."

Actions

Also available in: Atom PDF