How to handle SERVICE_UNAVAILABLE in Maritime 2.0 GraphQL response
{
"errors": [
{
"message": "service is temporarily unavailable",
"extensions": {
"code": "SERVICE_UNAVAILABLE"
}
}
],
"data": {
"vessels": {
"pageInfo": {
"hasNextPage": true,
"endCursor": "ZTBlYTkyYjUtN2MwMy00NTNkLThmNjMtMDJiMGZiMzZiMzcyQFsiNmYzYjc4ZGUtYmNkZC00NzIyLWIyYWYtNTFiMDg0ZDIyYjJhIl06OjYzMzgw"
},
"nodes": [
{
"staticData": {
"name": "DAEHO SEOUL",
"mmsi": 440154430,
"imo": 9078878,
"shipType": "GENERAL_CARGO",
"shipSubType": "MISCELLANEOUS",
"callsign": "120079",
"updateTimestamp": "2022-03-31T11:35:46.972Z",
"dimensions": {
"a": 64,
"b": 17,
"c": 7,
"d": 6,
"width": 13,
"length": 81
}
},
"lastPositionUpdate": {
"timestamp": "2022-04-06T10:45:36.000Z",
"updateTimestamp": "2022-04-06T10:45:41.529Z",
"latitude": 34.817315,
"longitude": 129.034755,
"collectionType": "TERRESTRIAL",
"navigationalStatus": "UNDER_WAY_USING_ENGINE",
"speed": 13.6,
"course": 57.7,
"heading": 56,
"rot": 0
},
"currentVoyage": {
"timestamp": "2022-04-05T03:04:38.394Z",
"updateTimestamp": "2022-04-05T03:04:40.043Z",
"draught": 6,
"eta": "2022-04-07T12:00:00.000Z",
"destination": "MUKHO",
"matchedPort": {
"port": {
"name": "Mukho",
"unlocode": "KRMUK",
"centerPoint": {
"longitude": 129.10180664062,
"latitude": 37.563068389893
}
},
"matchScore": 1
}
}
},
{
"staticData": {
"name": "HAIYANGSHIYOU113",
"mmsi": 412301570,
"imo": 4194304,
"shipType": "GENERAL_TANKER",
"shipSubType": null,
"callsign": "BFJT",
"updateTimestamp": "2022-04-06T09:50:09.857Z",
"dimensions": {
"a": 20,
"b": 260,
"c": 44,
"d": 10,
"width": 54,
"length": 280
}
},
"lastPositionUpdate": {
"timestamp": "2022-04-06T10:46:21.000Z",
"updateTimestamp": "2022-04-06T10:46:25.187Z",
"latitude": 38.235216666667,
"longitude": 119.14850666667,
"collectionType": "TERRESTRIAL",
"navigationalStatus": "NOT_DEFINED_DEFAULT",
"speed": 0.1,
"course": 144,
"heading": 95,
"rot": 0
},
"currentVoyage": {
"timestamp": "2021-12-16T14:27:55.000Z",
"updateTimestamp": "2022-03-26T00:15:19.080Z",
"draught": null,
"eta": null,
"destination": null,
"matchedPort": null
}
}
Error message "SERVICE_UNAVAILABLE" is occasionally returned in GraphQL responses when the matchedPort section is returned as "null". This is a partial error and does not affect the rest of the fields returned. Retrying may result in the partial error returned due to third-party partners API returning HTTP 500 errors.