Fix the initilization of ERR_MESSAGE and add an HTTP status

HTTP 501 == Not implemented
Merge branch 'master' of https://github.com/Fitblip/elasticsearch