made changes to APIError