xmidt-org / wrp-go

go implementation of the Web Routing Protocol
Apache License 2.0
4 stars 7 forks source link

Remove MessageType Validation from getMessageType #143

Closed maurafortino closed 4 months ago

maurafortino commented 7 months ago

Currently getMessageType which is a part of the DecodeRequest flow validates whether or not the message type in the request is a valid message type. If it's invalid it returns an error and the request is stopped. This functionality is no longer needed during DecodeRequest as a validator has been created to check the validity of the MessageType.

This validation should be removed so that DecodeRequest focuses solely on decoding the request. Validating the request should be done by the validators.