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

POST instance: don't attempt to parse instance from body when it's empty or not json #888

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

ivarne
Copy link
Member

@ivarne ivarne commented Nov 6, 2024

Reported by frontend, causing issues in tests.

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@ivarne ivarne added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Nov 6, 2024
@ivarne ivarne requested a review from martinothamar November 6, 2024 12:35
Copy link
Contributor

@martinothamar martinothamar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a test for this as well, maybe create an issue for it

@ivarne ivarne force-pushed the fix/empty-instance-post branch from 7284fd0 to fa15452 Compare November 7, 2024 08:50
@ivarne
Copy link
Member Author

ivarne commented Nov 7, 2024

We should probably have a test for this as well, maybe create an issue for it

Very good idea. Content type .Contains("application/json") works much better when the actual content type is application/json;charset=utf8

Copy link
Contributor

@martinothamar martinothamar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double approve 😄

Copy link

sonarqubecloud bot commented Nov 7, 2024

@ivarne ivarne merged commit 3410918 into main Nov 7, 2024
11 checks passed
@ivarne ivarne deleted the fix/empty-instance-post branch November 7, 2024 09:56
@danielskovli danielskovli changed the title POST instance: don't attemt to parse instance from body when it's empty or not json POST instance: don't attempt to parse instance from body when it's empty or not json Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Label Pull requests with bugfix. Used when generation releasenotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants