HAHOOS
HAHOOS
CC#
Created by HAHOOS on 2/20/2023 in #help
Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by...
It now outputs HttpResponseMessage and the code is:
var resp = new HttpResponseMessage(HttpStatusCode.NotFound)
{
Content = new StringContent(JsonConvert.SerializeObject("Code has been not found"), Encoding.UTF8, "application/json"),
ReasonPhrase = "Code Not Found",
};
return resp;
var resp = new HttpResponseMessage(HttpStatusCode.NotFound)
{
Content = new StringContent(JsonConvert.SerializeObject("Code has been not found"), Encoding.UTF8, "application/json"),
ReasonPhrase = "Code Not Found",
};
return resp;
17 replies
CC#
Created by HAHOOS on 2/20/2023 in #help
Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by...
I got it working, but I want it shorter so it will only display message and code. My current response:
{
"version": "1.1",
"content": {
"headers": [
{
"key": "Content-Type",
"value": [
"application/json; charset=utf-8"
]
}
]
},
"statusCode": 404,
"reasonPhrase": "Code Not Found",
"headers": [],
"trailingHeaders": [],
"requestMessage": null,
"isSuccessStatusCode": false
}
{
"version": "1.1",
"content": {
"headers": [
{
"key": "Content-Type",
"value": [
"application/json; charset=utf-8"
]
}
]
},
"statusCode": 404,
"reasonPhrase": "Code Not Found",
"headers": [],
"trailingHeaders": [],
"requestMessage": null,
"isSuccessStatusCode": false
}
17 replies
CC#
Created by HAHOOS on 2/20/2023 in #help
Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by...
A benefit for throwing an exception in the example is to notify the user/code that there was no code found in the database
17 replies
CC#
Created by HAHOOS on 2/20/2023 in #help
Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by...
Sadly, I can't return a result, because as an output I got a custom object called Pending
17 replies