Revamp middleware defensive check on arguments
mantzas opened this issue · comments
Sotirios Mantziaris commented
Is your feature request related to a problem? Please describe
Right now all middleware that take argument do not check if they are valid.
We should check if the arguments are valid and return an error.
This will introduce a breaking change.
Panayiotis Kritiotis commented
We need to decide how we'll be approaching this in terms of backward compatibility here
- Are we okay with introducing this breaking change in the existing package?
- Or should we introduce a V2 package under the existing middleware package to introduce this change and keep it backward compatible? (similarly with the big transition of components to V2)
Considering that
- this is probably an enhancing and not very aggressive change,
- it probably has a small impact since not many users directly use these middleware
- it's quick and easy to apply the error checking in case of an upgrade and
- from a maintenance perspective, we will have one less outdated, less-secure package,
I would lean towards approach (1) introducing a breaking change in the existing package.
I have by no means a strong opinion on this one though
@mantzas wdyt?
Sotirios Mantziaris commented
I agree!
Panayiotis Kritiotis commented
Great, we can proceed with this decision then.
I will get assigned to work on this one!