Source:
<code>private void injectTargetAccountAndContainerFromBlobId(String blobIdStr, RestRequest restRequest) throws RestServiceException { try { BlobId blobId = new BlobId(blobIdStr, clusterMap); Account targetAccount = accountService.getAccountById(blobId.getAccountId()); if (targetAccount == null) { frontendMetrics.getHeadDeleteUnrecognizedAccountCount.inc(); if (blobId.getAccountId() != Account.UNKNOWN_ACCOUNT_ID) { throw new RestServiceException( "Account from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " cannot be recognized", RestServiceErrorCode.InvalidAccount); } else { logger.warn( <START> "Account cannot be identified for blobId={} with accountId={}. Setting targetAccount to UNKNOWN_ACCOUNT", <END> blobIdStr, blobId.getAccountId()); targetAccount = Account.UNKNOWN_ACCOUNT; } } Container targetContainer = targetAccount.getContainerById(blobId.getContainerId()); if (targetContainer == null) { frontendMetrics.getHeadDeleteUnrecognizedContainerCount.inc(); throw new RestServiceException( "Container from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " containerId=" + blobId.getContainerId() + " cannot be recognized", RestServiceErrorCode.InvalidContainer); } RestUtils.setArg(restRequest, InternalKeys.TARGET_ACCOUNT_KEY, targetAccount, false); RestUtils.setArg(restRequest, InternalKeys.TARGET_CONTAINER_KEY, targetContainer, false); logger.trace("Sets targetAccount={} targetContainer={} for restRequest={} ", targetAccount, targetContainer, restRequest); } catch (RestServiceException e) { throw e; } catch (Exception e) { throw new RestServiceException( "Invalid blob id=" + blobIdStr + " during injecting account and container from blobId string", RestServiceErrorCode.BadRequest); } }</code><technical_language>is this case allowed</technical_language>

Target:
private void injectTargetAccountAndContainerFromBlobId(String blobIdStr, RestRequest restRequest) throws RestServiceException { BlobId blobId; try { blobId = new BlobId(blobIdStr, clusterMap); } catch (Exception e) { throw new RestServiceException("Invalid blob id=" + blobIdStr, RestServiceErrorCode.BadRequest); } Account targetAccount = accountService.getAccountById(blobId.getAccountId()); if (targetAccount == null) { frontendMetrics.getHeadDeleteUnrecognizedAccountCount.inc(); if (blobId.getAccountId() != Account.UNKNOWN_ACCOUNT_ID) { throw new RestServiceException( "Account from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " cannot be recognized", RestServiceErrorCode.InvalidAccount); } else { logger.debug( "Account cannot be found for blobId={} with accountId={}. Setting targetAccount to UNKNOWN_ACCOUNT", blobIdStr, blobId.getAccountId()); targetAccount = Account.UNKNOWN_ACCOUNT; } } Container targetContainer = targetAccount.getContainerById(blobId.getContainerId()); if (targetContainer == null) { frontendMetrics.getHeadDeleteUnrecognizedContainerCount.inc(); throw new RestServiceException( "Container from blobId=" + blobIdStr + "with accountId=" + blobId.getAccountId() + " containerId=" + blobId.getContainerId() + " cannot be recognized", RestServiceErrorCode.InvalidContainer); } setTargetAccountAndContainerInRestRequest(restRequest, targetAccount, targetContainer); }