Added JSONRecovery middleware for JSON error reporting