코딩하는 둥둥

Error: getaddrinfo ENOTFOUND {{url}} 본문

IDE/Postman

Error: getaddrinfo ENOTFOUND {{url}}

둥둥 2023. 1. 15. 16:42
728x90

Error: getaddrinfo ENOTFOUND {{url}}

보통 테스트 환경에 따라 서버 Ip가 다르기때문에 편리하게 사용하기 위해 url을 환경변수에 세팅해 사용한다.

회사에서 기존에 작성된 collection을 받아 사용하게 되었는데 환경변수를 설정해주지 않아서 에러가 발생했다.

발생 원인 1. 환경변수 설정을 하지 않아서

url에는 환경변수가 사용되어있는데 Postman에서 환경변수 설정을 하지 않았을 경우 에러가 발생한다.

해결 : 환경 변수 설정

  1. 환경 설정 페이지로 이동
  2. Add버튼을 눌러 환경을 추가
    image
  3. 환경의 이름, 사용할 변수 등을 지정
    image

발생 원인 2. 환경변수 설정 중 Current ValueIntial Value와 맞춰주지 않아서

환경 변수 설정 중 Current Value와 Inital Value값을 서로 맞춰주지 않으면 오류가 발생한다.

🔎 Current Value VS Inital Value

  • Inital Value
  • Current Value

References.

https://hihellloitland.tistory.com/94

https://community.postman.com/t/postman-monitor-error-getaddrinfo-enotfound/3149/4

https://community.postman.com/t/error-getaddrinfo-enotfound-host/13794

728x90

'IDE > Postman' 카테고리의 다른 글

Postman  (0) 2023.01.15