Async function return [closed]

0

How do I get the return of this function:

async function retrocredit(file) {
  const params = {
    body: {
      filetype: 'jpg',
      content: file
    },
    headers: {}
  };

  const [err, response] = await HandlePromise(API.post('Retrocredit', '/storefile', params));

  if (err) {
    return CommonResponse({
      statusCode: err.errorCode || 500,
      errorMessage: err.errorMessage || '---'
    });
  }

  return CommonResponse({ response });
}

She is returning this error to me

    
asked by anonymous 04.01.2019 / 19:31

0 answers