DB errors are not reported anywhere #16

Closed
opened 2 years ago by shelvacu · 3 comments
shelvacu commented 2 years ago

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:

  1. Setup AccountHub correctly
  2. Setup BinStack, except don't run database.sql
  3. Login and try to create a new location

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.

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: 1. Setup AccountHub correctly 2. Setup BinStack, except don't run `database.sql` 3. Login and try to create a new location 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.
skylarmt added the
bug
label 2 years ago
Owner

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.

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.
skylarmt added the
wontfix
label 2 years ago
Poster

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.

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.
Poster

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

https://source.netsyms.com/Apps/WebAppTemplate/pulls/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
skylarmt closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.