DB errors are not reported anywhere #16
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If some SQL error occurs during saving (say hypothetically, no tables exist because of an earlier PEBKAC) then no error is reported anywhere.
Steps to reproduce:
database.sql
Expected result: BinStack reports back a fatal error, or a blank 500 page, or something similar; along with a detailed error in the logs.
Actual result: BinStack reports "Location saved.", the location doesn't show (it can't, the table doesn't exist), and no error shows up in the logs.
I'm don't think this is worth the effort to fix, especially as it's not a bug with the application, but rather with the sysadmin deploying it.
However, I will accept a good pull request to https://source.netsyms.com/Apps/WebAppTemplate that throws an error when the database doesn't exist or has no tables.
The problem isn't specifically that it doesn't check for missing tables, the problem is that it reports a success even when there are errors, effectively losing data.
Consider another scenario: Everything has been set up correctly, and the system has been in use for awhile, and then the file system runs out of space. In this case, all
SELECT
queries will work (so the user can authenticate, and view current inventory).First, the user logs on, selects the BinStack application, and sees a list of items. Everything appears to be fine.
Then, the user clicks "New Item", fills out all the information, clicks "Save". The application reports "Item saved." even though the database kicked back an error and did not save the new item.
The user doesn't notice that the new item didn't appear in the list, because there's already plenty of items there. They click "New Item" again and continue on. Every item they try to add disappears until the issue is noticed and fixed.
It's likely that this issue exists in other applications as well, but I haven't checked.
Apps/WebAppTemplate#3 here is the pull request I made to fix the issue across all apps, I thought it would automatically link but it didn't so here it is