-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* error reporting improvements * close neo4j 4.0 sessions * improved error testing * stop/remove datafeeds when database is dropped * fix race condition when feed is stopping * stop and restart data feeds when database stops and starts * simplify component using useEffect
- Loading branch information
moxious
authored
May 19, 2020
1 parent
8fec475
commit 257a823
Showing
11 changed files
with
183 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
const asStr = err => `${err}`; | ||
|
||
const matches = (substr) => (err) => asStr(err).toLowerCase().indexOf(substr.toLowerCase()) > -1; | ||
const contains = (err, str) => asStr(err).toLowerCase().indexOf(str.toLowerCase()) > -1; | ||
|
||
const permissionDenied = matches('permission denied'); | ||
const noProcedure = matches('no procedure with the name'); | ||
const unauthorized = matches('unauthorized'); | ||
const bookmarks = matches('Supplied bookmark'); | ||
const failedToEstablishConnection = matches('failed to establish connection in'); | ||
const browserSecurityConstraints = matches('security constraints in your web browser'); | ||
const noActiveDatabase = matches('active database'); | ||
const insecureWSFromHTTPS = matches('insecure websocket connection may not be initiated from a page loaded over HTTPS'); | ||
const repeatedAuthFailure = matches('incorrect authentication details too many times in a row'); | ||
const fileNotFound = matches('java.io.FileNotFoundException'); | ||
const connectionRefused = matches('ERR_CONNECTION_REFUSED'); | ||
const apocFileImportNotEnabled = matches('apoc.import.file.enabled'); | ||
const notUpToRequestedVersion = matches('database not up to requested version'); | ||
|
||
const isNeo4jError = err => | ||
failedToEstablishConnection(err) || browserSecurityConstraints(err) || | ||
permissionDenied(err) || noProcedure(err) || | ||
unauthorized(err) || bookmarks(err) || | ||
noActiveDatabase(err) || insecureWSFromHTTPS(err) || | ||
repeatedAuthFailure(err) || fileNotFound(err) || | ||
connectionRefused(err) || notUpToRequestedVersion(err); | ||
|
||
const isAPOCError = err => apocFileImportNotEnabled(err); | ||
|
||
export default { | ||
isNeo4jError, | ||
isAPOCError, | ||
matches, | ||
permissionDenied: matches('permission denied'), | ||
noProcedure: matches('no procedure with the name'), | ||
unauthorized: matches('unauthorized'), | ||
failedToEstablishConnection: matches('failed to establish connection in'), | ||
browserSecurityConstraints: matches('security constraints in your web browser'), | ||
noActiveDatabase: matches('active database'), | ||
contains: (err, str) => asStr(err).toLowerCase().indexOf(str.toLowerCase()) > -1, | ||
insecureWSFromHTTPS: matches('insecure websocket connection may not be initiated from a page loaded over HTTPS'), | ||
repeatedAuthFailure: matches('incorrect authentication details too many times in a row'), | ||
fileNotFound: matches('java.io.FileNotFoundException'), | ||
connectionRefused: matches('ERR_CONNECTION_REFUSED'), | ||
apocFileImportNotEnabled: matches('apoc.import.file.enabled'), | ||
notUpToRequestedVersion: matches('database not up to requested version'), | ||
permissionDenied, | ||
noProcedure, | ||
unauthorized, | ||
bookmarks, | ||
failedToEstablishConnection, | ||
browserSecurityConstraints, | ||
noActiveDatabase, | ||
contains, | ||
insecureWSFromHTTPS, | ||
repeatedAuthFailure, | ||
fileNotFound, | ||
connectionRefused, | ||
apocFileImportNotEnabled, | ||
notUpToRequestedVersion, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
257a823
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: