요청 오류 처리

Maps Datasets API는 있습니다. 예를 들어 토큰이 만료된 경우 요청이 다음을 반환합니다.

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential.
    Expected OAuth 2 access token, login cookie or other valid authentication credential.
    See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "CREDENTIALS_MISSING",
        "domain": "googleapis.com",
        "metadata": {
          "method": "google.maps.mapsplatformdatasets.v1alpha.MapsPlatformDatasetsV1Alpha.ListDatasets",
          "service": "mapsplatformdatasets.googleapis.com"
        }
      }
    ]
  }
}

다음을 만들 때 displayName와 같은 필수 본문 매개변수를 생략하는 경우 데이터세트에서 요청을 실행하면 다음 결과가 반환됩니다.

{
  "error": {
    "code": 400,
    "message": "display_name: Display name must be provided",
    "status": "INVALID_ARGUMENT"
  }
}

잘못된 데이터 세트 ID를 전달하면 요청은 다음을 반환합니다.

{
  "error": {
    "code": 404,
    "message": "Dataset not found",
    "status": "NOT_FOUND"
  }
}

오류 및 오류 처리에 대한 자세한 내용은 다음을 참고하세요. 오류.