h
h
CC#
Created by h on 7/9/2023 in #help
✅ Endpoint returns 400 when I add authorization code, works correctly without
thanks, but how do i write the stream back? or do i have to use a different method of retrieving the body?
11 replies
CC#
Created by h on 7/9/2023 in #help
✅ Endpoint returns 400 when I add authorization code, works correctly without
yes, it works
11 replies
CC#
Created by h on 7/9/2023 in #help
✅ Endpoint returns 400 when I add authorization code, works correctly without
Expected response is 204 No Content and the user getting updated
11 replies
CC#
Created by h on 7/9/2023 in #help
✅ Endpoint returns 400 when I add authorization code, works correctly without
Here is the failing controller:
/// <summary>
/// Update user
/// </summary>
[HttpPut]
[Authorize(Policy = "UpdateUserPolicy")]
public async Task<IActionResult> Put([FromBody] UserDTO user)
{
await _userService.UpdateUser(user);
return NoContent();
}
/// <summary>
/// Update user
/// </summary>
[HttpPut]
[Authorize(Policy = "UpdateUserPolicy")]
public async Task<IActionResult> Put([FromBody] UserDTO user)
{
await _userService.UpdateUser(user);
return NoContent();
}
The request I am giving to the controller:
{
"id": 22,
"avatar": "https://i.gyazo.com/image.jpg",
"email": "[email protected]",
"userName": "abc"
}
{
"id": 22,
"avatar": "https://i.gyazo.com/image.jpg",
"email": "[email protected]",
"userName": "abc"
}
Error:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-8cf778e26725b04bcee8ca370880e523-c5bc015a9dbf7254-00",
"errors": {
"$": [
"The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
]
}
}
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-8cf778e26725b04bcee8ca370880e523-c5bc015a9dbf7254-00",
"errors": {
"$": [
"The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
]
}
}
11 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
what timezone are you in
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
i will do that and respond
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
maybe i should just switch the development to windows at this point since no issues there
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
sudo apt install dotnet yadda yadda
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
i did that
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
i am currently on windows
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
ubuntu 22.04
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
i am running it on my linux install using dotnet run /media/h/path/to/solution/project/ $ dotnet run
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
it no longer does, it had to do with it being a snap install of dotnet
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
the app isnt ready yet
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
i am launching using dotnet run
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
no i am not deploying
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
also it works on windows
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
it just doesnt work locally
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
on docker it works completely fine
71 replies
CC#
Created by h on 7/3/2023 in #help
✅ ASP.NET Core Web API application crashes with no error message only in some environments
$ bin/Debug/net6.0/Thread.NET.WebAPI
[1] 19794 segmentation fault (core dumped) bin/Debug/net6.0/Thread.NET.WebAPI
$ bin/Debug/net6.0/Thread.NET.WebAPI
[1] 19794 segmentation fault (core dumped) bin/Debug/net6.0/Thread.NET.WebAPI
71 replies