Improve error handling
Merge branch 'master' into OAS-dev