extensions: fix issue in error-handling (ref c3cc4c6)