Midtrans / midtrans-nodejs-client

Official Midtrans Payment API Client for Node JS | https://midtrans.com
MIT License
181 stars 57 forks source link

Error: getaddrinfo EAI_AGAIN app.midtrans.com #84

Open nayakayp opened 3 weeks ago

nayakayp commented 3 weeks ago

Halo, hari ini tiba-tiba client tidak bisa melakukan pembayaran. Tolong bantuannya ya.

Sepertinya krn saya pakai library ini.

{
  "ApiResponse": null,
  "httpStatusCode": null,
  "level": "error",
  "message": "[createSubscriptionPayment] Failed creating snap payment. Midtrans API request failed. HTTP response not found, likely connection failure, with message: \"getaddrinfo EAI_AGAIN app.midtrans.com\"",
  "name": "MidtransError",
  "rawHttpClientData": {
    "code": "EAI_AGAIN",
    "config": {
      "auth": {
        "password": "",
        "username": "Mid-server-REDACTED"
      },
      "data": "{\"transaction_details\":{\"order_id\":\"PSID-C88BD-1730968509190\",\"gross_amount\":85000},\"customer_details\":{\"first_name\":\"Nayaka Yoga Pradipta\",\"email\":\"nayakayp@gmail.com\"},\"item_details\":[{\"id\":\"66e764c41fe48dcae3c14da3\",\"price\":85000,\"quantity\":1,\"name\":\"Premium Plan\",\"category\":\"subscription\"}]}",
      "headers": {
        "Accept": "application/json",
        "Content-Length": 296,
        "Content-Type": "application/json",
        "user-agent": "midtransclient-nodejs/1.3.0"
      },
      "maxBodyLength": -1,
      "maxContentLength": -1,
      "method": "post",
      "params": {},
      "timeout": 0,
      "transformRequest": [
        null
      ],
      "transformResponse": [
        null
      ],
      "transitional": {
        "clarifyTimeoutError": false,
        "forcedJSONParsing": true,
        "silentJSONParsing": true
      },
      "url": "https://app.midtrans.com/snap/v1/transactions",
      "xsrfCookieName": "XSRF-TOKEN",
      "xsrfHeaderName": "X-XSRF-TOKEN"
    },
    "message": "getaddrinfo EAI_AGAIN app.midtrans.com",
    "name": "Error",
    "stack": "Error: getaddrinfo EAI_AGAIN app.midtrans.com\n    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)",
    "status": null
  },
  "stack": "MidtransError: Midtrans API request failed. HTTP response not found, likely connection failure, with message: \"getaddrinfo EAI_AGAIN app.midtrans.com\"\n    at /app/node_modules/midtrans-client/lib/httpClient.js:95:13\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
}