Change 500 HTTP return codes to 400 or 422 for wrong parameters
While starting a core contract upgrade flow authorise, wrong parameters return this error:
HTTP 500 field stateAndRef missing in payload ContractUpgradeFlow_AuthorisePayload(stateAndRef=StateAndRef_Object(state=TransactionState_Object(data=authorise payload data, contract=My Contract, notary=null, encumbrance=null, constraint=null), ref=null), upgradedContractClass=null)
In case of wrong parameters the error should be 422 Unprocessable entity or 400 Bad request.