ApiError: Add individual error codes for further testing
Tests: use asserts
Merge pull request #4 from jnv/master

Store code for API errors in exception, use asserts in tests