Is it possible to replace the default arcpy error message with a custom message using `arcpy.AddError(msg)` or else for a GP Service published into ArcGIS Server?
if I use:
arcpy.AddError("This is my custom error message")
My custom message only appears printed in the details. like this: (sorry its in french):
{
error : {
code: 400,
message: "Unable to complete operation.",
details: [
"Erreur d’exécution de l’outil. AppLogin Job ID:
jfe0aa728897644eb9344fa9fc7a48864 : This is my custom error message
Échec de l’exécution de (AppLogin).
Échec de l’exécution de (AppLogin)."
]
}
What I want instead its just:
{
error : {
code : 400,
message : "This is my custom error message"
}
}
@MaximeDemers did you find any solution for this?
Hi Marco,
No I did not found a solution, but I did not search really further. Maybe with SOE or SOI it would be possible. https://developers.arcgis.com/enterprise-sdk/guide/net/overview-of-developing-soes-net/