question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while invoking Billing API

See original GitHub issue

Bug Report

Description

  1. What did you do? Invoke Billing API for testing
  2. What happened? TypeError [ERR_INVALID_ARG_TYPE]: The “to” argument must be of type string. Received type undefined
  3. What should’ve happened? Normal response without error
  4. What’s the content of your serverless.yml file? billing:

    Defines an HTTP API endpoint that calls the main function in billing.js

    - path: url path is /billing

    - method: POST request

    handler: billing.main events:
    • http: path: billing method: post cors: true authorizer: aws_iam
  5. What’s the output you get when you use the SLS_DEBUG=* environment variable (e.g. SLS_DEBUG=* serverless deploy)

at validateString (internal/validators.js:112:11) at Object.relative (path.js:438:5) at C:\Users\asnai\notes-app-api\node_modules\serverless-webpack\lib\validate.js:182:38 at arrayMap (C:\Users\asnai\notes-app-api\node_modules\lodash\lodash.js:639:23) at Function.map (C:\Users\asnai\notes-app-api\node_modules\lodash\lodash.js:9554:14) at processConfig (C:\Users\asnai\notes-app-api\node_modules\serverless-webpack\lib\validate.js:177:37) at ServerlessPlugin.validate (C:\Users\asnai\notes-app-api\node_modules\serverless-webpack\lib\validate.js:229:14) at ServerlessPlugin.tryCatcher (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromiseCtx (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\promise.js:641:10) at _drainQueueStep (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\async.js:97:12) at _drainQueue (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\asnai\notes-app-api\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21) at process.topLevelDomainCallback (domain.js:131:23)

Similar or dependent issues: None

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mcc9229commented, Nov 5, 2019

The environment block in your serverless.yml is duplicated. Delete one and that should solve the problem. The remaining block should look like this:

2019-11-05 00_22_02-Window

0reactions
uzenith360commented, Sep 13, 2020

The environment block in your serverless.yml is duplicated. Delete one and that should solve the problem. The remaining block should look like this:

2019-11-05 00_22_02-Window

Worked for me too. I had to correct my indentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Billing API Error on Test Shop - Shopify Community
Hi,. I solved the error, the issue was that I was using a "api key" of a privare app, instead the an "api...
Read more >
Invoking the Financials Invoices REST API from OIC fails with ...
A 400 Bad Request Error indicates that the target service is unable (or refuses) to process the request sent by the client (Oracle...
Read more >
BillingClient.BillingResponseCode - Android Developers
A user billing error occurred during processing. int, DEVELOPER_ERROR. Error resulting from incorrect usage of the API. int, ERROR.
Read more >
Partner Center Billing API is giving 403 forbidden error while ...
Partner Center Billing API is giving 403 forbidden error while accessing from a service. Hello, I am trying to access one of the...
Read more >
403 error when I'm using Google Cloud Billing Budget API ...
Is the service account a member of the billing account? Your question does not show how you are authorizing the client. You are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found