docs: function runAfterDetach (args, methodMeta, ret) {
      // skip if no afterDetach methods
      if (!defined(methodMeta.afterDetach)) {
          return
      }
      // wait for original promise to resolve then run detached after functions
      ret.then(res => {
          // build arguments for after methods
          args = {
              args: args.args ? args.args : args,
              res: res,
              origRes: args.origRes ? args.origRes : args.res,
              session: args.session,
          }
          // run all functions
          _.each(methodMeta.afterDetach, method => {
              // call method
              (method)(args, methodMeta.signature, 'afterDetach')
              // log errors
              .catch(err => {
                  // require log client
                  if (!defined(methodMeta.logClient)) {
                      return
                  }
                  // log error
                  methodMeta.logClient.error(err, args.session)
              })
          })
      })
  }