[
https://issues.apache.org/jira/browse/YUNIKORN-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17783059#comment-17783059
]
Michael Akinyemi edited comment on YUNIKORN-2123 at 11/6/23 12:00 AM:
----------------------------------------------------------------------
[~steinsgateted] I would love to work on this.
Just for some clarity on a suitable replacement for each function. Would
replacing the "applications" portion of the error message with the function
name suffice?
Example:
In the following code:
{code:java}
func assertParamsMissing(t *testing.T, resp *MockResponseWriter) {
var errInfo dao.YAPIError
err := json.Unmarshal(resp.outputBytes, &errInfo)
assert.NilError(t, err, "failed to unmarshal applications dao response from
response body") {code}
turns into:
{code:java}
func assertParamsMissing(t *testing.T, resp *MockResponseWriter) {
var errInfo dao.YAPIError
err := json.Unmarshal(resp.outputBytes, &errInfo)
assert.NilError(t, err, "failed to unmarshal params missing dao response from
response body") {code}
was (Author: JIRAUSER302698):
[~steinsgateted] I would love to work on this.
Just for some clarity on a suitable replacement for each function. Would
replacing the "applications" portion with the function name suffice?
> Modify json.Unmarshal error message
> -----------------------------------
>
> Key: YUNIKORN-2123
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2123
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: core - common
> Reporter: Ted Lin
> Assignee: Michael Akinyemi
> Priority: Major
> Labels: newbie
>
> [https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers_test.go#L1199-L1278]
> In this code, if json.Unmarshal error, we often see:
> {code:java}
> assert.NilError(t, err, "failed to unmarshal applications dao response from
> response body"){code}
> We can replace "applications" with the meaning suitable for the function.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]