Open slingamn opened 2 years ago
There is currently an irctest asserting the old behavior:
I don't want to revisit this in the current development cycle.
I don't remember all the back-and-forth on this issue, but the current behavior is in line with the current specification:
If the target does not exist or the client does not have permissions to query it, the INVALID_TARGET error code SHOULD be returned
So I think this is probably a wontfix? @emersion, any thoughts?
I don't remember the scenario in which this happens sadly.
From a client dev PoV: I can't guess when it's inappropriate to load history since this depends on server-specific rules. I don't want to silence errors since they could be due to a client bug (which I want users to open bug reports about) or real server error (which users want to know about).
tl;dr If you want my client to display an error to the user, send FAIL
. If you want my client to no show any history, send an empty batch.
That makes sense, but the current spec language implies that you should treat INVALID_TARGET
in particular as meaning that the server rejected the history request (the equivalent of either an HTTP 403 or 404, essentially). It seems to me that as specified, INVALID_TARGET
should not become a user-visible error. But we could also just amend the spec.
For what it's worth, the original reproduction case was from /part
in Gamja, but I can no longer reproduce this against Gamja 3f059567c5. So I'm mostly interested in resolving the theoretical question here, since it might be a spec bug.
I am not sure. My main concern is that I want to properly bubble back errors to the user when it makes sense to, and not receive bug reports about broken chat history from confused users when displaying an error would disambiguate the situation.
That makes sense. Since there is no clear evidence of a current compatibility problem, I'm going to keep the status quo behavior for the next Ergo release, then revisit the question in 2023.
Gamja 43f1329fb07 against Ergo 2.8.0 on the testnet just now:
This displays a user-visible error message. Unclear what we want to do here, but probably Ergo should be returning an empty batch instead of a FAIL?