Finished ApiInterface tests and modified the ApiInterface to correctly handle some errors from the server.