Catch and handle HTTP 500 error.
Merge pull request #15 from rhiever/http-500-error

Catch and handle HTTP 500 error.