question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty Exception Body

See original GitHub issue

I am going to test bad request (400) with a customized error message. The test gets 400 as status code; however the content body is empty.

[HttpPost]
public override async Task<IActionResult> PostAsync([FromBody] Contract.User entity)
{
if (entity == null)
{
    return Error(new Error() { Status  = "400", Title = "Invalid request body", Detail = "The provided request 
    entity body is not valid." });
}

    return await base.PostAsync(entity);
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
OKTAYKIRcommented, Jul 21, 2017
  • I use version 2.1.0.
  • I am certain because, i debugged this case.
  • If I can find time, I will do it.

Thanks.

1reaction
jaredcnancecommented, Jul 23, 2017

@OKTAYKIR thanks for taking the time to report and reproduce this issue. It should be resolved in v2.1.1.

If you’re still having trouble please reopen this issue. For your reference, see #145 for the fix.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring boot Rest responding with empty body for ...
But when I add my @ControllerAdvice, Spring doesn't response with generic error body. The body is empty with correct response headers
Read more >
Empty request JSON body throws exception in a ...
When attempting to parse a JSON body, which is empty, an exception seems to happen. Environment. msw: 0.16.2. Expected behavior. Empty body is ......
Read more >
Spring boot Rest responding with empty body for exceptions ...
But it broke all other exceptions handled by ResponseEntityExceptionHandler , and returned empty response body for them. But the fix is easy, just...
Read more >
[regression] Empty response body when user is an ...
Empty response body when user has 'access site reports' permission and an exception is thrown; trace cannot be encoded because of recursion ...
Read more >
Is it ever ok to have an empty catch statement?
I do it all the time with things like conversion errors in D: import std.conv, std.stdio, std.exception; void main(string[] args) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found