(GRAILS-9602) Fixed errors handling