adding exception class to be used when merging restrictions failed
adding validation checks and necessary responses to the Query decoding process