Skip to content

Commit

Permalink
Merge pull request #956 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Add logging
  • Loading branch information
JohnDuprey authored Jul 9, 2024
2 parents ec3ac66 + f47e670 commit 20b59a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Function Invoke-ExecExtensionsConfig {

Add-CIPPAzDataTableEntity @Table -Entity $Config -Force | Out-Null

$CippUri = [System.Uri]$TriggerMetadata.Headers.'x-ms-original-url'
$Uri = $TriggerMetadata.Headers.referer ?? $TriggerMetadata.Headers.'x-ms-original-url'
$CippUri = [System.Uri]$Uri
$AddObject = @{
PartitionKey = 'InstanceProperties'
RowKey = 'CIPPURL'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,12 @@ function Invoke-HuduExtensionSync {
}
} catch {
$CompanyResult.Errors.add("Company: Failed to import domain: $_")
Write-LogMessage -tenant $Tenant.defaultDomainName -tenantid $Tenant.customerId -API 'Hudu Sync' -message "Company: Failed to import domain: $_" -level 'Error'
}

Write-LogMessage -tenant $Tenant.defaultDomainName -tenantid $Tenant.customerId -API 'Hudu Sync' -message 'Company: Completed Sync' -level 'Information'
} catch {
$CompanyResult.Errors.add("Company: A fatal error occured: $_")
Write-LogMessage -tenant $Tenant.defaultDomainName -tenantid $Tenant.customerId -API 'Hudu Sync' -message "Company: A fatal error occured: $_" -level 'Error'
}
return $CompanyResult
}

0 comments on commit 20b59a2

Please sign in to comment.