diff --git a/src/Altinn.App.Api/Controllers/EventsReceiverController.cs b/src/Altinn.App.Api/Controllers/EventsReceiverController.cs index 8ebea9652..d9645ed32 100644 --- a/src/Altinn.App.Api/Controllers/EventsReceiverController.cs +++ b/src/Altinn.App.Api/Controllers/EventsReceiverController.cs @@ -73,7 +73,7 @@ public async Task Post([FromQuery] string code, [FromBody] CloudEv } catch (Exception ex) { - _logger.LogError("Unable to process event {eventType}. An exception was raised while checking for delivery status of message {messageid}. Exception throw {exceptionMessage}", cloudEvent.Type, cloudEvent.Id, ex.Message); + _logger.LogError("Unable to process event {eventType}. An exception was raised while processing message {messageid}. Exception thrown {exceptionMessage}", cloudEvent.Type, cloudEvent.Id, ex.Message); return new StatusCodeResult(500); } } diff --git a/src/Altinn.App.Core/EFormidling/Implementation/EformidlingStatusCheckEventHandler.cs b/src/Altinn.App.Core/EFormidling/Implementation/EformidlingStatusCheckEventHandler.cs index 1e36b9091..a155dca91 100644 --- a/src/Altinn.App.Core/EFormidling/Implementation/EformidlingStatusCheckEventHandler.cs +++ b/src/Altinn.App.Core/EFormidling/Implementation/EformidlingStatusCheckEventHandler.cs @@ -2,6 +2,7 @@ using Altinn.ApiClients.Maskinporten.Interfaces; using Altinn.ApiClients.Maskinporten.Models; using Altinn.App.Core.Configuration; +using Altinn.App.Core.Constants; using Altinn.App.Core.Extensions; using Altinn.App.Core.Features; using Altinn.App.Core.Helpers; @@ -15,6 +16,7 @@ using Microsoft.Extensions.Options; using Newtonsoft.Json; using System.Net; +using System.Net.Http.Headers; using System.Security.Cryptography.X509Certificates; namespace Altinn.App.Core.EFormidling.Implementation @@ -114,6 +116,8 @@ private async Task AddCompleteConfirmation(int instanceOwnerPartyId, G TokenResponse altinnToken = await GetOrganizationToken(); _httpClient.BaseAddress = new Uri(_platformSettings.ApiStorageEndpoint); + _httpClient.DefaultRequestHeaders.Add(General.SubscriptionKeyHeaderName, _platformSettings.SubscriptionKey); + _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = await _httpClient.PostAsync(altinnToken.AccessToken, apiUrl, new StringContent(string.Empty)); if (response.StatusCode == HttpStatusCode.OK)