added error handling for 500 and missing localised messages
Merge gh-tomqsm/master