Add error type for JSON responses