Proper error handling for dispatch method