Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when person/organisation does not exist in Altinn #13

Open
erlendoksvoll opened this issue Nov 2, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@erlendoksvoll
Copy link
Member

Description

When requesting consent the person/organisation must exist in Altinns databases. When they don't it just fails with a generic error.

"person/org xxxx cannot receive consent requests in Altinn" or something along those lines. Filter if ssn.

Steps To Reproduce

Request:
{"requestor":"980178986","subject":"998997801","evidenceRequests":[{"evidenceCodeName":"RestanserV2","requestConsent":true},{"evidenceCodeName":"MvaMeldingsOpplysning","requestConsent":true},{"evidenceCodeName":"Arbeidsgiveravgift","requestConsent":true},{"evidenceCodeName":"OppdragUtenlandskeVirksomheter","requestConsent":true},{"evidenceCodeName":"Firmaattest"},{"evidenceCodeName":"Enhetsregisterdata"},{"evidenceCodeName":"Aarsregnskap","parameters":[{"evidenceParamName":"NumberOfYears","value":1}]}],"consentReference":"schibsted-smb","externalReference":"Demo","languageCode":"no-nb"}

Response:
{
code: 1013,
description: "There was an error during an attempt to access a upstream source. The remote server might be down or overloaded",
innerExceptionMessage: "System.Net.Http.HttpRequestException: Server returned error status code: 400, ",
innerExceptionStackTrace: " at Nadobe.Core.Helpers.DelegatingHandlers.ExceptionDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in D:\a\1\s\Core\Helpers\DelegatingHandlers\ExceptionDelegatingHandler.cs:line 39 at Polly.CircuitBreaker.AsyncCircuitBreakerEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext, ExceptionPredicates shouldHandleExceptionPredicates, ResultPredicates1 shouldHandleResultPredicates, ICircuitController1 breakerController) at Polly.AsyncPolicy1.ExecuteAsync(Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Nadobe.Core.Services.ConsentService.CreateConsentRequest(Accreditation accreditation, List1 evidenceCodesRequiringConsent) in D:\a\1\s\Core\Services\ConsentService.cs:line 324 at Nadobe.Core.Services.ConsentService.Initiate(Accreditation accreditation) in D:\a\1\s\Core\Services\ConsentService.cs:line 92 at Nadobe.Core.FuncAuthorization.<>c__DisplayClass8_0.<<Run>b__0>d.MoveNext() in D:\a\1\s\Core\FuncAuthorization.cs:line 128 --- End of stack trace from previous location where exception was thrown --- at Nadobe.Core.Filters.AzureFilterHelper.Handle(List1 attributes, ExecutionContext context, ILogger logger, HttpRequestMessage request, Func`1 action) in D:\a\1\s\Core\Filters\AzureFilterHelper.cs:line 98",
}

@erlendoksvoll erlendoksvoll added the bug Something isn't working label Nov 2, 2022
@erlendoksvoll erlendoksvoll moved this to 📋 Backlog in DAN public backlog Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant