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
I encountered an issue when using the GetRecommend(string userId) method, which calls "api/recommend/" + userId endpoint in the Gorse.NET library. When the Gorse server returns a null response, the library throws a GorseException with the message "unexpected empty response."
If the Gorse server returns a null response, I believe it would be more appropriate for the library to return null rather than throwing an exception. This change would allow end users to handle null responses more gracefully according to their specific requirements.
Should I open a pull request to fix this problem?
The text was updated successfully, but these errors were encountered:
________________________________
From: Nebiyou Hailemariam ***@***.***>
Sent: Thursday, October 24, 2024 8:23
To: gorse-io/Gorse.NET ***@***.***>
Cc: zhenghaoz ***@***.***>; Mention ***@***.***>
Subject: [gorse-io/Gorse.NET] Potential bug: Unexpected Exception for Null Response in Gorse.NET (Issue #11)
Hi @zhenghaoz<https://github.com/zhenghaoz>,
I encountered an issue when using the GetRecommend(string userId), which calls "api/recommend/" + userId whimethod in the Gorse.NET library. When the Gorse server returns a null response, the library throws a GorseException with the message "unexpected empty response."
Here’s the relevant code:
throw new GorseException
{
StatusCode = HttpStatusCode.InternalServerError,
Message = "unexpected empty response"
};
Expected Behavior:
If the Gorse server returns a null response, I believe it would be more appropriate for the library to return null rather than throwing an exception. This change would allow end users to handle null responses more gracefully according to their specific requirements.
Should I open a pull request to fix this problem?
—
Reply to this email directly, view it on GitHub<#11>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACE4T2H5LHWMB53M6XLOSDDZ5A4ZVAVCNFSM6AAAAABQP5NGY6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYTAMBZG4YDQMY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Hi @zhenghaoz,
I encountered an issue when using the
GetRecommend(string userId)
method, which calls"api/recommend/" + userId
endpoint in the Gorse.NET library. When the Gorse server returns a null response, the library throws a GorseException with the message "unexpected empty response."Here’s the relevant code:
Expected Behavior:
If the Gorse server returns a
null
response, I believe it would be more appropriate for the library to returnnull
rather than throwing an exception. This change would allow end users to handle null responses more gracefully according to their specific requirements.Should I open a pull request to fix this problem?
The text was updated successfully, but these errors were encountered: