Improved notification and status code handling