requestCode debug and error handling

Added debug info and improved error handling in WhatsProt::requestCode()