Exit on API error.