Add Error Code check for finished jobs.

Fix https://its.cern.ch/jira/browse/CAF-279