Add error code to the except block in the builder