More error details
Closed this issue · 6 comments
The data submission error is too generic There was an error submitting the report!
. Add more details about where/why an error occurred so the user can be sure to fix the data entry error and successfully submit the record the next time.
(Is there any useful information in the server log?)
@ToddVolkening A date and approximate time when an error was encountered would be useful if you can provide this.
Todd tested a few data entries and all went well. Buck received the following error when trying to submit:
There was an error submitting the report!: Error: {"code":400,"message":"Unable to complete operation.","details":["Error executing tool. NewCollectionEvent : \nTraceback (most recent call last):\n File "C:\arcgisserver\directories\arcgissystem\arcgisinput\ElectrofishingTest\Toolbox.GPServer\extracted\v101\scripts\NewCollectionEvent.py", line 94, in \n make_insert(table, attributes)\n File "C:\arcgisserver\directories\arcgissystem\arcgisinput\ElectrofishingTest\Toolbox.GPServer\extracted\v101\scripts\NewCollectionEvent.py", line 84, in make_insert\n cursor.execute(statement)\nDataError: ('22001', u'[22001] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]String or binary data would be truncated. (8152) (SQLExecDirectW); [22001] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The statement has been terminated. (3621)')\n\nFailed to execute (NewCollectionEvent).\nFailed to execute (NewCollectionEvent)."]}
String or binary data would be truncated.
This means that some data was longer than allowed. The fix would be to limit that on the client and then truncate on the server if the client is bypassed.
I thought that I already limited it on the client. Maybe I missed a field. Maybe I need to log the incoming data so that I can check it out.
Although the error verbiage might be difficult for users to diagnose the issue, it seems they are providing enough information for the devs to recognize the issue. DWR has tested several more submissions successfully, so I think we're okay to close this now.