It is possible to send a POST request setting any value to the editor field (e.g. a_editor, when submitting an answer).
If the editor is found, it works. If the whole field is removed, it works (by defaulting to the basic editor). If the field is set but the editor is not found, this throws a 500 error.
I think giving the client a basic editor when they attempt to fetch an invalid one seems like an acceptable solution. Catching the error specifically and giving the user the error string seems to be overcomplicated, considering the client is most likely deliberately modifying the HTTP request.
It is possible to send a POST request setting any value to the editor field (e.g.
a_editor
, when submitting an answer).If the editor is found, it works. If the whole field is removed, it works (by defaulting to the basic editor). If the field is set but the editor is not found, this throws a 500 error.
I think giving the client a basic editor when they attempt to fetch an invalid one seems like an acceptable solution. Catching the error specifically and giving the user the error string seems to be overcomplicated, considering the client is most likely deliberately modifying the HTTP request.