Altinn / Altinn/app-lib-dotnet

Problem details object not returned with 4xx-responses from app

Open
#54 1 comment 1 reaction 0 assignees View on GitHub
kind/bug
Dominant language
C#
Stars
8
Forks
27
Avg merge
1h 21m
Merged PRs (30d)
7

Description

## Describe the bug
Swagger specifies that 404 / 400 responses include a problem details object.
Currently only a string is returned.

We need to land whether the response should include the problem details object or if the swagger should be updated.

## To Reproduce
Steps to reproduce the behavior:
1. Send a bad request to the app
2. See error

## Expected behavior
Swagger matches the actual response from the controllers.

## Screenshots
![image](https://user-images.githubusercontent.com/47737608/134296128-9c4334ea-0b09-4c0d-a0f6-97ee2814318e.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the bad request and comparing the controller's 400/404 response with the Swagger response definition. Review the relevant controller behavior and Swagger specification; done means the implementation and documented problem-details response agree, or the specification is corrected if the string response is intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.