Reed
Reed
CC#
Created by Reed on 9/15/2023 in #help
❔ Filter entries showing Row ID instead of Actual value
No description
3 replies
CC#
Created by Reed on 9/5/2023 in #help
❔ Limit Free Format Textbox's input
I mean for example if you have bullet points in an outlook email, after pasting it to a textbox element it replaces them with "[]" and same goes for some french characters
5 replies
CC#
Created by Reed on 8/17/2023 in #help
❔ Reordering of columns: (DevExpress/XAML)
I assume it has something to do with DevExpress
6 replies
CC#
Created by Reed on 8/17/2023 in #help
❔ Reordering of columns: (DevExpress/XAML)
By that I meant switching the code order lines in the XAML file
6 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
oh, thought you wanted me to read the whole article. I will look into that specific part
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
I thought the section"Use exceptions to modify the response" Would fix it but after implementing it I still wasn't able to catch the repsonse
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
I will read on it, thank you
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
I found out that [ApiController] is responsible for throwing default 400's if there's something wrong with the body of the request
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
that is possible 🤔 But is it possible to catch or "Filter" this exception?
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
I would like something of the form: error message: xxx status code: xxx
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
I don't think a client should know that
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
It has references to which line of code it originated
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
above is the error I get
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
{
"type": "sdfsdfsdfsd",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "sdfsdfsdfsdf",
"errors": {
"requestForm": [
"The requestForm field is required."
],
"$.whencalculated": [
"The JSON value could not be converted to System.Nullable`1[System.DateTime]. Path: SENSITIVE DATA"
]
}
}
{
"type": "sdfsdfsdfsd",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "sdfsdfsdfsdf",
"errors": {
"requestForm": [
"The requestForm field is required."
],
"$.whencalculated": [
"The JSON value could not be converted to System.Nullable`1[System.DateTime]. Path: SENSITIVE DATA"
]
}
}
18 replies
CC#
Created by Reed on 7/25/2023 in #help
❔ removing sensitive info (invalid post body)
code snippet:
"xxController.cs":
namespace xx.Controllers
{
[ApiController] // it is an option to remove this to be able to parse the body properly (see: https://stackoverflow.com/questions/60071028/invalid-model-class-property-error-in-net-core-api)
[Produces("application/json")]
[Route("xx/api/[controller]")]
[PostBodyFilterAttribute("xxController")]
public class xxController : Controller
{
[HttpPost]
public async Task<ActionResult<ResponseFormDto>> PostTodoItem([FromBody]RequestFormDto requestForm)
{
// DOES NOT REACH THIS PART
try
{ ....

"RequestFormDto.cs"
public class RequestFormDto
{
[JsonPropertyName("whencalculated")]
public DateTime? WhenCalculated {
get;
set; }
....

"xxController.cs":
namespace xx.Controllers
{
[ApiController] // it is an option to remove this to be able to parse the body properly (see: https://stackoverflow.com/questions/60071028/invalid-model-class-property-error-in-net-core-api)
[Produces("application/json")]
[Route("xx/api/[controller]")]
[PostBodyFilterAttribute("xxController")]
public class xxController : Controller
{
[HttpPost]
public async Task<ActionResult<ResponseFormDto>> PostTodoItem([FromBody]RequestFormDto requestForm)
{
// DOES NOT REACH THIS PART
try
{ ....

"RequestFormDto.cs"
public class RequestFormDto
{
[JsonPropertyName("whencalculated")]
public DateTime? WhenCalculated {
get;
set; }
....

18 replies