treat when error comes before $response defined
typo
fix rewrite rule