src/record/record-request.js
function onStorageResponse (
  error, record, recordName, socketWrapper, onComplete, onError, options, context, metaData
) {
  if (error) {
    sendError(
      C.EVENT.RECORD_LOAD_ERROR,
      `error while loading ${recordName} from storage:${error.toString()}`,
      recordName,
      socketWrapper,
      onError,
      options,
      context,
      metaData
    )
  } else {
    onComplete.call(context, record || null, recordName, socketWrapper)

    if (record) {
      options.cache.set(recordName, record, () => {}, metaData)
    }
  }
}
function onStorageResponse (
  error, record, recordName, socketWrapper, onComplete, onError, options, context, metaData
) {
  if (error) {
    sendError(
      C.EVENT.RECORD_LOAD_ERROR,
      `error while loading ${recordName} from storage:${error.toString()}`,
      recordName,
      socketWrapper,
      onError,
      options,
      context,
      metaData
    )
  } else {
    onComplete.call(context, record || null, recordName, socketWrapper)

    if (record) {
      options.cache.set(recordName, record, () => {}, metaData)
    }
  }
}
function onStorageResponse ( error , record , recordName , socketWrapper , onComplete , onError , options , context , metaData ) { if ( error ) { sendError ( C . EVENT . RECORD_LOAD_ERROR , ` ${ recordName } ${ error . toString ( ) } ` , recordName , socketWrapper , onError , options , context , metaData ) } else { onComplete . call ( context , record || null , recordName , socketWrapper ) if ( record ) { options . cache . set ( recordName , record , ( ) => { } , metaData ) } } }
Callback for responses returned by the storage connector. The request will complete or error
here, if the record couldn't be found in storage no further attempts to retrieve it will be made
Callback for responses returned by the storage connector . The request will complete or error here if the record couldn t be found in storage no further attempts to retrieve it will be made