Improve error handling for createWorkItem

  If create work item fails call the callback with the error