501 Errors are handled correctly.
404 errors are now handled.
404s now work.
All errors now processed correctly.
Merge pull request #11 from james-dibble/api-error-codes

Error handling and processing