"Is it possible for a hacker to be able to read the exception notification and then use this information to manipulate my scripts?"
May be.
Typically, you want to provide the least amount of information possible for the end user in an error state. In this case, if you tell someone a specific get variable, it will not try to supply this variable with random values to see how the application behaves.
Of course, you should also balance this with the needs of your real users. If the variable is the one they usually control, then providing an answer about the problem with the value is perfectly acceptable.
UPDATE
A recently launched web API that seems to think that throwing general error messages is the way I want to update a bit.
It is very important that the web API returns the required information to the consumption system in order to understand what is wrong and fix it.
In one recent case for a payment processing API, their documentation was simply incorrect. The test transaction data that they showed was consistently returned from the "Server Error 500", and we did not have the opportunity to ask for help, but to get one of our developers by phone and painstakingly go through each element in its XML. Of the 50 elements, only one name had the same name as in their "developer docs"
In another integration, we were given "Server Error 402". - This one was not a payment gateway. Although they were never mentioned in their documents, it is clear that this message meant that the JSON parameter was missing. By the way, this was a parameter that was not referenced in their documents, and again it took time with its developer to identify it.
In both of the above cases, it would be incredibly useful if the error message responded with an example of a valid document message. Similar to how old Unix / DOS commands returned via help when you passed bad parameters. I really don't want to talk to other programmers. I know that their time is expensive, and they are more likely to do something other than answer a support call; but by the way, if I work at 10:00 pm and I need an RFN answer, then until the programmer can contact the phone, the next day there will rarely be an option.
Notme
source share