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
When our current PRs are merged, I'd like to do a PR to make changes similar to here. Basically, when we are developing with the flux go bindings, an error message might look like the following:
Adding node for arm Generation: 0 Vendor: generic Match policy: first Load format: JSON Graph Format (JGF)Error creating context: issue initializing resource api client -1
We get a generic message "error creating context" and the return code, which isn't helpful. The developer here could make a call to cli.GetErrMsg(), but the issue is that if the developer is, for example, not touching the code but instead working on some json graph, they will have no clue what is wrong. When I add a simple tweak to my test branch to retrieve the message (given nonzero) I am passed forward the message:
Load format: JSON Graph Format (JGF)Error creating context: issue initializing resource api client:reapi_cli_initialize: Runtime error: resource_query_t: ERROR: fill_fetcher: malformed metadata in an JGF node for 0ERROR: error generating resources
Ah yes, my malformed metadata! Of course! So when #1120 is merged I'd like to follow up with a PR to do this small change, and I'd also propose renaming the GetErrMsg() to be fully written out (mostly for consistency in our naming) and I'll make sure to fix all the places in other projects that function is used.
The text was updated successfully, but these errors were encountered:
I want to ping again on this issue (because I'm hitting it again). Even when I call cli.GetErrMsg() the error message isn't great to tell me what is wrong:
I suspect it's the same or a similar issue as before (I'm converting JGF v2 back to v1 for flux) but probably if we give this API a look a more meaningful message to the developer user would be really helpful.
When our current PRs are merged, I'd like to do a PR to make changes similar to here. Basically, when we are developing with the flux go bindings, an error message might look like the following:
We get a generic message "error creating context" and the return code, which isn't helpful. The developer here could make a call to
cli.GetErrMsg()
, but the issue is that if the developer is, for example, not touching the code but instead working on some json graph, they will have no clue what is wrong. When I add a simple tweak to my test branch to retrieve the message (given nonzero) I am passed forward the message:Ah yes, my malformed metadata! Of course! So when #1120 is merged I'd like to follow up with a PR to do this small change, and I'd also propose renaming the
GetErrMsg()
to be fully written out (mostly for consistency in our naming) and I'll make sure to fix all the places in other projects that function is used.The text was updated successfully, but these errors were encountered: