case ResultCode.NO_SUCH_OBJECT_INT_VALUE:
return SCIMException.createException(404, errorMessage);
case ResultCode.CONSTRAINT_VIOLATION_INT_VALUE:</BUG>
case ResultCode.ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE:
case ResultCode.ENTRY_ALREADY_EXISTS_INT_VALUE:
<BUG>return SCIMException.createException(409, errorMessage);
default:
return SCIMException.createException(500, errorMessage);
}</BUG>
}

case ResultCode.NO_SUCH_OBJECT_INT_VALUE:
return new ResourceNotFoundException(errorMessage, e);
case ResultCode.CONSTRAINT_VIOLATION_INT_VALUE:
case ResultCode.ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE:
case ResultCode.ENTRY_ALREADY_EXISTS_INT_VALUE:
return new ResourceConflictException(errorMessage, e);
case ResultCode.ASSERTION_FAILED_INT_VALUE:
return new PreconditionFailedException(errorMessage, e);
default:
return new ServerErrorException(errorMessage, e);
