fix exception handling for PATCH/PUT