Updated Dispatch functions with error codes

There are a number of reasons why the dispatch could fail.