added support for apiUrl setup
handle error when job creation failed