There is no reason for the code to be checking for a legal value of the message code in this function. By doing so you eliminate the code calling the functions from using new codes which are not directly supported. In my case I need to use FETCH in a message I am sending. There are no new requirements placed on the library to do so so forbidding it from happening does not make sense. Thing will be true of servers which might want to use new error codes such as the upcoming 4.29 Too Many Requests.
There is no reason for the code to be checking for a legal value of the message code in this function. By doing so you eliminate the code calling the functions from using new codes which are not directly supported. In my case I need to use FETCH in a message I am sending. There are no new requirements placed on the library to do so so forbidding it from happening does not make sense. Thing will be true of servers which might want to use new error codes such as the upcoming 4.29 Too Many Requests.