fix: write error page data to db