error and complete handlers for POST