REST Response Error Messages

Is it possible to configure REST to dump error information in the response when hitting a 500 server error? The default seems to be “Sorry! Something went wrong. Please contact your system administrator.”

Though pulling the actual error from the server logs is possible, I’d love to have some control over this.

Thank you!
-Joseph

1 Like

Add or edit in your web.config
<system.web> <customErrors mode="Off" /> </system.web>

6 Likes

@josephmoeller did you put some spyware on my box? I literally asked this exact same question of @Olga yesterday … runs antivirus
Changing that setting does work

@Olga, again, thank you! This did work for me immediately!
@josecgomez ha! That would be a good trick! nothing to see here… (exec spywareuninstall.exe @target?ipjosecgomez)

You are welcome. :slight_smile:
It is easy one, i just copy/paste from documentation

1 Like

We do not currently have a <system.web> in our config file. What needs to be done after adding the full code snippet? IIS Restart?

Yep, this should reload the settings into the application running on IIS. I think a stop/start of the app pool might do this, too, to avoid the full iisreset per @aidacra but depending on your version, I’ve seen issues with this working as expected.

1 Like

I did an app pool start and stop and was able to see the change. Thanks!

1 Like

Did anyone run into this after the Pilot upgrade to Kinetic 2022.1? How do you edit the web.config for a Public Cloud?

You can’t

2 Likes

And honestly, this should only be done on Dev instances. Sending error messages to a client is a dangerous security practice. The better solution is logging to a place that is available by the dev.

Aaaaand, that is a part of the DevOps Epicor Idea. So vote if you want to…

1 Like

We just started getting this error in all of our environments. It just so happens that the day it started we installed 2022 on our TEST server, which is isolated from LIVE. However, we are also getting the errors in LIVE. Was anyone able to determine what caused this, or how to fix other than suppressing the error.

1 Like

@Olga , does this setting affect information that shows up in appserver logs, or is it just related to what displays in the client?

I am trying to troubleshoot a frustrating CPQ error and am getting a 500 Internal Server Error.

Note - this is out of the box CPQ, nothing crazy/custom. I assume Epicor does not like something in the data that CPQ is trying to post, but I have no idea what. The appserver logs give me a stack trace, but it’s giving me nothing to work with in identifying what’s wrong:

You cannot affect what other server will show you. You have to have access to that log. I don’t know how kbmax works

Thanks, yeah, I realized that after posting that the failure is actually happening while Epicor server code tried to communicate with KBMax… So my only hope is Support being able to see something on their servers.