Altinn / Altinn/app-lib-dotnet

More informative error response body

Open
#298 0 comments 0 reactions 0 assignees View on GitHub
kind/feature-request org/dsb
Dominant language
C#
Stars
8
Forks
27
Avg merge
1h 21m
Merged PRs (30d)
7

Description

### Description

When an error occurs in Altinn API usage, the response body we see is often lacking the actual cause. This forces us to go into the azure portal, look up application insights, write/open a query, run the query so we get the actual cause.

It would be really nice if the `outerMessage` could be added to the response body when an error occurs. This field often contains the real cause of the failure.

Example of current response body:
`Instantiation of appId dsb/siv-1005-svar-rek failed for party 51397781`

This says nothing about what causes instantiation to fail. Inspection shows that the `outerMessage` contains the following for the example above: `Could not prefill, a source value was not set for target: PlisMeta.PlisId`.

If this information was included in the response body, we would not have to go into application insights at all.

Example of a more informative response body for the above example:
`Instantiation of appId dsb/siv-1005-svar-rek failed for party 51397781. Details: Could not prefill, a source value was not set for target: PlisMeta.PlisId`

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in the app-lib-dotnet error-response path and trace how the current response body is assembled for failed app instantiation. Check how outerMessage is exposed for the failure, then verify that the response includes the existing message plus the relevant details without requiring an Application Insights lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.