Encode opspec before pushing to db
Use exceptions to process incorrect requests