On HTTP Error: Set `.$loading` and `.$error` Flag