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 have searched existing issues to ensure the issue has not already been raised
Issue
I find it quite inconsequent, if the remove method of ContentTypeParser in case it is not a string or RegExp throws a FST_ERR_CTP_INVALID_TYPE-error but not an Error if there is no parser matching the contentType.
Imho the else case of this if-condition should throw an Error
I am not sure if it should be a bug or something that should fix.
Does anyone really care about if the content-type that should be remove is not exist? If not, throwing shouldn't be a good DX either.
Prerequisites
Issue
I find it quite inconsequent, if the remove method of ContentTypeParser in case it is not a string or RegExp throws a FST_ERR_CTP_INVALID_TYPE-error but not an Error if there is no parser matching the contentType.
Imho the else case of this if-condition should throw an Error
fastify/lib/contentTypeParser.js
Line 152 in 897360a
The text was updated successfully, but these errors were encountered: