Test refactory
Error is now show as a JSON object