Consistently return JSON API errors