Typo
Do not catch generic exception (catch it above)
Set last_error on error