Fix namespace error for APIError object.