Add new test for `get_last_error`