error_handling.js
function expressResponseError(response, error, message) {
  let errorMessage = "there was an error in the request";
  if(message)
    errorMessage = message
  response.json({ success: false, error: errorMessage });
  console.error(error);
}
function expressResponseError(response, error, message) {
  let errorMessage = "there was an error in the request";
  if(message)
    errorMessage = message
  response.json({ success: false, error: errorMessage });
  console.error(error);
}
function expressResponseError ( response , error , message ) { let errorMessage = "there was an error in the request" ; if ( message ) errorMessage = message response . json ( { success : false , error : errorMessage } ) ; console . error ( error ) ; }
General internal error for express with console.error
General internal error for express with console . error