beatlabs / patron

Microservice framework following best cloud practices with a focus on productivity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revamp middleware defensive check on arguments

mantzas opened this issue · comments

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.

We need to decide how we'll be approaching this in terms of backward compatibility here

  1. Are we okay with introducing this breaking change in the existing package?
  2. 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?

Great, we can proceed with this decision then.

I will get assigned to work on this one!