report a permanent error instead of aborting on unknown error codes

fixes #479