MySQL.parseNativeQueryError()

Attempt to identify and parse a raw error from sending a native query and normalize it to a standard error footprint.

Usage

Hover over inputs/exits for more info.

var MySQL = require('machinepack-mysql');


// Attempt to identify and parse a raw error from sending a native query and normalize it to a standard error footprint.

MySQL.parseNativeQueryError({

nativeQueryError: '===',

meta: '===',

}).execSync();

Inputs

nativeQueryError required

The error sent back from the database as a result of a failed native query.

'==='
meta

Additional stuff to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

success

OK.

{ footprint: {}, meta: '===' }