@aws-sdk/client-appsync 3.112.0 → 3.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +245 -197
- package/dist-es/protocols/Aws_restJson1.js +245 -197
- package/package.json +6 -6
|
@@ -1791,8 +1791,7 @@ const deserializeAws_restJson1AssociateApiCommandError = async (output, context)
|
|
|
1791
1791
|
body: await parseBody(output.body, context),
|
|
1792
1792
|
};
|
|
1793
1793
|
let response;
|
|
1794
|
-
|
|
1795
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1794
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1796
1795
|
switch (errorCode) {
|
|
1797
1796
|
case "AccessDeniedException":
|
|
1798
1797
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -1808,10 +1807,12 @@ const deserializeAws_restJson1AssociateApiCommandError = async (output, context)
|
|
|
1808
1807
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1809
1808
|
default:
|
|
1810
1809
|
const parsedBody = parsedOutput.body;
|
|
1810
|
+
const $metadata = deserializeMetadata(output);
|
|
1811
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1811
1812
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
1812
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1813
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1813
1814
|
$fault: "client",
|
|
1814
|
-
$metadata
|
|
1815
|
+
$metadata,
|
|
1815
1816
|
});
|
|
1816
1817
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1817
1818
|
}
|
|
@@ -1837,8 +1838,7 @@ const deserializeAws_restJson1CreateApiCacheCommandError = async (output, contex
|
|
|
1837
1838
|
body: await parseBody(output.body, context),
|
|
1838
1839
|
};
|
|
1839
1840
|
let response;
|
|
1840
|
-
|
|
1841
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1841
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1842
1842
|
switch (errorCode) {
|
|
1843
1843
|
case "BadRequestException":
|
|
1844
1844
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -1857,10 +1857,12 @@ const deserializeAws_restJson1CreateApiCacheCommandError = async (output, contex
|
|
|
1857
1857
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1858
1858
|
default:
|
|
1859
1859
|
const parsedBody = parsedOutput.body;
|
|
1860
|
+
const $metadata = deserializeMetadata(output);
|
|
1861
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1860
1862
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
1861
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1863
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1862
1864
|
$fault: "client",
|
|
1863
|
-
$metadata
|
|
1865
|
+
$metadata,
|
|
1864
1866
|
});
|
|
1865
1867
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1866
1868
|
}
|
|
@@ -1886,8 +1888,7 @@ const deserializeAws_restJson1CreateApiKeyCommandError = async (output, context)
|
|
|
1886
1888
|
body: await parseBody(output.body, context),
|
|
1887
1889
|
};
|
|
1888
1890
|
let response;
|
|
1889
|
-
|
|
1890
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1891
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1891
1892
|
switch (errorCode) {
|
|
1892
1893
|
case "ApiKeyLimitExceededException":
|
|
1893
1894
|
case "com.amazonaws.appsync#ApiKeyLimitExceededException":
|
|
@@ -1912,10 +1913,12 @@ const deserializeAws_restJson1CreateApiKeyCommandError = async (output, context)
|
|
|
1912
1913
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1913
1914
|
default:
|
|
1914
1915
|
const parsedBody = parsedOutput.body;
|
|
1916
|
+
const $metadata = deserializeMetadata(output);
|
|
1917
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1915
1918
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
1916
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1919
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1917
1920
|
$fault: "client",
|
|
1918
|
-
$metadata
|
|
1921
|
+
$metadata,
|
|
1919
1922
|
});
|
|
1920
1923
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1921
1924
|
}
|
|
@@ -1941,8 +1944,7 @@ const deserializeAws_restJson1CreateDataSourceCommandError = async (output, cont
|
|
|
1941
1944
|
body: await parseBody(output.body, context),
|
|
1942
1945
|
};
|
|
1943
1946
|
let response;
|
|
1944
|
-
|
|
1945
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1947
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1946
1948
|
switch (errorCode) {
|
|
1947
1949
|
case "BadRequestException":
|
|
1948
1950
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -1961,10 +1963,12 @@ const deserializeAws_restJson1CreateDataSourceCommandError = async (output, cont
|
|
|
1961
1963
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1962
1964
|
default:
|
|
1963
1965
|
const parsedBody = parsedOutput.body;
|
|
1966
|
+
const $metadata = deserializeMetadata(output);
|
|
1967
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1964
1968
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
1965
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1969
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1966
1970
|
$fault: "client",
|
|
1967
|
-
$metadata
|
|
1971
|
+
$metadata,
|
|
1968
1972
|
});
|
|
1969
1973
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1970
1974
|
}
|
|
@@ -1990,8 +1994,7 @@ const deserializeAws_restJson1CreateDomainNameCommandError = async (output, cont
|
|
|
1990
1994
|
body: await parseBody(output.body, context),
|
|
1991
1995
|
};
|
|
1992
1996
|
let response;
|
|
1993
|
-
|
|
1994
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1997
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1995
1998
|
switch (errorCode) {
|
|
1996
1999
|
case "AccessDeniedException":
|
|
1997
2000
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2004,10 +2007,12 @@ const deserializeAws_restJson1CreateDomainNameCommandError = async (output, cont
|
|
|
2004
2007
|
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
2005
2008
|
default:
|
|
2006
2009
|
const parsedBody = parsedOutput.body;
|
|
2010
|
+
const $metadata = deserializeMetadata(output);
|
|
2011
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2007
2012
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2008
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2013
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2009
2014
|
$fault: "client",
|
|
2010
|
-
$metadata
|
|
2015
|
+
$metadata,
|
|
2011
2016
|
});
|
|
2012
2017
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2013
2018
|
}
|
|
@@ -2033,8 +2038,7 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
|
|
|
2033
2038
|
body: await parseBody(output.body, context),
|
|
2034
2039
|
};
|
|
2035
2040
|
let response;
|
|
2036
|
-
|
|
2037
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2041
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2038
2042
|
switch (errorCode) {
|
|
2039
2043
|
case "ConcurrentModificationException":
|
|
2040
2044
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -2050,10 +2054,12 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
|
|
|
2050
2054
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2051
2055
|
default:
|
|
2052
2056
|
const parsedBody = parsedOutput.body;
|
|
2057
|
+
const $metadata = deserializeMetadata(output);
|
|
2058
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2053
2059
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2054
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2060
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2055
2061
|
$fault: "client",
|
|
2056
|
-
$metadata
|
|
2062
|
+
$metadata,
|
|
2057
2063
|
});
|
|
2058
2064
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2059
2065
|
}
|
|
@@ -2079,8 +2085,7 @@ const deserializeAws_restJson1CreateGraphqlApiCommandError = async (output, cont
|
|
|
2079
2085
|
body: await parseBody(output.body, context),
|
|
2080
2086
|
};
|
|
2081
2087
|
let response;
|
|
2082
|
-
|
|
2083
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2088
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2084
2089
|
switch (errorCode) {
|
|
2085
2090
|
case "ApiLimitExceededException":
|
|
2086
2091
|
case "com.amazonaws.appsync#ApiLimitExceededException":
|
|
@@ -2102,10 +2107,12 @@ const deserializeAws_restJson1CreateGraphqlApiCommandError = async (output, cont
|
|
|
2102
2107
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2103
2108
|
default:
|
|
2104
2109
|
const parsedBody = parsedOutput.body;
|
|
2110
|
+
const $metadata = deserializeMetadata(output);
|
|
2111
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2105
2112
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2106
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2113
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2107
2114
|
$fault: "client",
|
|
2108
|
-
$metadata
|
|
2115
|
+
$metadata,
|
|
2109
2116
|
});
|
|
2110
2117
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2111
2118
|
}
|
|
@@ -2131,8 +2138,7 @@ const deserializeAws_restJson1CreateResolverCommandError = async (output, contex
|
|
|
2131
2138
|
body: await parseBody(output.body, context),
|
|
2132
2139
|
};
|
|
2133
2140
|
let response;
|
|
2134
|
-
|
|
2135
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2141
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2136
2142
|
switch (errorCode) {
|
|
2137
2143
|
case "ConcurrentModificationException":
|
|
2138
2144
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -2148,10 +2154,12 @@ const deserializeAws_restJson1CreateResolverCommandError = async (output, contex
|
|
|
2148
2154
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2149
2155
|
default:
|
|
2150
2156
|
const parsedBody = parsedOutput.body;
|
|
2157
|
+
const $metadata = deserializeMetadata(output);
|
|
2158
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2151
2159
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2152
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2160
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2153
2161
|
$fault: "client",
|
|
2154
|
-
$metadata
|
|
2162
|
+
$metadata,
|
|
2155
2163
|
});
|
|
2156
2164
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2157
2165
|
}
|
|
@@ -2177,8 +2185,7 @@ const deserializeAws_restJson1CreateTypeCommandError = async (output, context) =
|
|
|
2177
2185
|
body: await parseBody(output.body, context),
|
|
2178
2186
|
};
|
|
2179
2187
|
let response;
|
|
2180
|
-
|
|
2181
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2188
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2182
2189
|
switch (errorCode) {
|
|
2183
2190
|
case "BadRequestException":
|
|
2184
2191
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2197,10 +2204,12 @@ const deserializeAws_restJson1CreateTypeCommandError = async (output, context) =
|
|
|
2197
2204
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2198
2205
|
default:
|
|
2199
2206
|
const parsedBody = parsedOutput.body;
|
|
2207
|
+
const $metadata = deserializeMetadata(output);
|
|
2208
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2200
2209
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2201
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2210
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2202
2211
|
$fault: "client",
|
|
2203
|
-
$metadata
|
|
2212
|
+
$metadata,
|
|
2204
2213
|
});
|
|
2205
2214
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2206
2215
|
}
|
|
@@ -2222,8 +2231,7 @@ const deserializeAws_restJson1DeleteApiCacheCommandError = async (output, contex
|
|
|
2222
2231
|
body: await parseBody(output.body, context),
|
|
2223
2232
|
};
|
|
2224
2233
|
let response;
|
|
2225
|
-
|
|
2226
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2234
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2227
2235
|
switch (errorCode) {
|
|
2228
2236
|
case "BadRequestException":
|
|
2229
2237
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2242,10 +2250,12 @@ const deserializeAws_restJson1DeleteApiCacheCommandError = async (output, contex
|
|
|
2242
2250
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2243
2251
|
default:
|
|
2244
2252
|
const parsedBody = parsedOutput.body;
|
|
2253
|
+
const $metadata = deserializeMetadata(output);
|
|
2254
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2245
2255
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2246
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2256
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2247
2257
|
$fault: "client",
|
|
2248
|
-
$metadata
|
|
2258
|
+
$metadata,
|
|
2249
2259
|
});
|
|
2250
2260
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2251
2261
|
}
|
|
@@ -2267,8 +2277,7 @@ const deserializeAws_restJson1DeleteApiKeyCommandError = async (output, context)
|
|
|
2267
2277
|
body: await parseBody(output.body, context),
|
|
2268
2278
|
};
|
|
2269
2279
|
let response;
|
|
2270
|
-
|
|
2271
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2280
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2272
2281
|
switch (errorCode) {
|
|
2273
2282
|
case "BadRequestException":
|
|
2274
2283
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2284,10 +2293,12 @@ const deserializeAws_restJson1DeleteApiKeyCommandError = async (output, context)
|
|
|
2284
2293
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2285
2294
|
default:
|
|
2286
2295
|
const parsedBody = parsedOutput.body;
|
|
2296
|
+
const $metadata = deserializeMetadata(output);
|
|
2297
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2287
2298
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2288
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2299
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2289
2300
|
$fault: "client",
|
|
2290
|
-
$metadata
|
|
2301
|
+
$metadata,
|
|
2291
2302
|
});
|
|
2292
2303
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2293
2304
|
}
|
|
@@ -2309,8 +2320,7 @@ const deserializeAws_restJson1DeleteDataSourceCommandError = async (output, cont
|
|
|
2309
2320
|
body: await parseBody(output.body, context),
|
|
2310
2321
|
};
|
|
2311
2322
|
let response;
|
|
2312
|
-
|
|
2313
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2323
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2314
2324
|
switch (errorCode) {
|
|
2315
2325
|
case "BadRequestException":
|
|
2316
2326
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2329,10 +2339,12 @@ const deserializeAws_restJson1DeleteDataSourceCommandError = async (output, cont
|
|
|
2329
2339
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2330
2340
|
default:
|
|
2331
2341
|
const parsedBody = parsedOutput.body;
|
|
2342
|
+
const $metadata = deserializeMetadata(output);
|
|
2343
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2332
2344
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2333
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2345
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2334
2346
|
$fault: "client",
|
|
2335
|
-
$metadata
|
|
2347
|
+
$metadata,
|
|
2336
2348
|
});
|
|
2337
2349
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2338
2350
|
}
|
|
@@ -2354,8 +2366,7 @@ const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, cont
|
|
|
2354
2366
|
body: await parseBody(output.body, context),
|
|
2355
2367
|
};
|
|
2356
2368
|
let response;
|
|
2357
|
-
|
|
2358
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2369
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2359
2370
|
switch (errorCode) {
|
|
2360
2371
|
case "AccessDeniedException":
|
|
2361
2372
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2374,10 +2385,12 @@ const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, cont
|
|
|
2374
2385
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2375
2386
|
default:
|
|
2376
2387
|
const parsedBody = parsedOutput.body;
|
|
2388
|
+
const $metadata = deserializeMetadata(output);
|
|
2389
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2377
2390
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2378
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2391
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2379
2392
|
$fault: "client",
|
|
2380
|
-
$metadata
|
|
2393
|
+
$metadata,
|
|
2381
2394
|
});
|
|
2382
2395
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2383
2396
|
}
|
|
@@ -2399,8 +2412,7 @@ const deserializeAws_restJson1DeleteFunctionCommandError = async (output, contex
|
|
|
2399
2412
|
body: await parseBody(output.body, context),
|
|
2400
2413
|
};
|
|
2401
2414
|
let response;
|
|
2402
|
-
|
|
2403
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2415
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2404
2416
|
switch (errorCode) {
|
|
2405
2417
|
case "ConcurrentModificationException":
|
|
2406
2418
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -2416,10 +2428,12 @@ const deserializeAws_restJson1DeleteFunctionCommandError = async (output, contex
|
|
|
2416
2428
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2417
2429
|
default:
|
|
2418
2430
|
const parsedBody = parsedOutput.body;
|
|
2431
|
+
const $metadata = deserializeMetadata(output);
|
|
2432
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2419
2433
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2420
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2434
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2421
2435
|
$fault: "client",
|
|
2422
|
-
$metadata
|
|
2436
|
+
$metadata,
|
|
2423
2437
|
});
|
|
2424
2438
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2425
2439
|
}
|
|
@@ -2441,8 +2455,7 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
|
|
|
2441
2455
|
body: await parseBody(output.body, context),
|
|
2442
2456
|
};
|
|
2443
2457
|
let response;
|
|
2444
|
-
|
|
2445
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2458
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2446
2459
|
switch (errorCode) {
|
|
2447
2460
|
case "AccessDeniedException":
|
|
2448
2461
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2464,10 +2477,12 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
|
|
|
2464
2477
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2465
2478
|
default:
|
|
2466
2479
|
const parsedBody = parsedOutput.body;
|
|
2480
|
+
const $metadata = deserializeMetadata(output);
|
|
2481
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2467
2482
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2468
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2483
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2469
2484
|
$fault: "client",
|
|
2470
|
-
$metadata
|
|
2485
|
+
$metadata,
|
|
2471
2486
|
});
|
|
2472
2487
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2473
2488
|
}
|
|
@@ -2489,8 +2504,7 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
2489
2504
|
body: await parseBody(output.body, context),
|
|
2490
2505
|
};
|
|
2491
2506
|
let response;
|
|
2492
|
-
|
|
2493
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2507
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2494
2508
|
switch (errorCode) {
|
|
2495
2509
|
case "ConcurrentModificationException":
|
|
2496
2510
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -2506,10 +2520,12 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
2506
2520
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2507
2521
|
default:
|
|
2508
2522
|
const parsedBody = parsedOutput.body;
|
|
2523
|
+
const $metadata = deserializeMetadata(output);
|
|
2524
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2509
2525
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2510
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2526
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2511
2527
|
$fault: "client",
|
|
2512
|
-
$metadata
|
|
2528
|
+
$metadata,
|
|
2513
2529
|
});
|
|
2514
2530
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2515
2531
|
}
|
|
@@ -2531,8 +2547,7 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
|
|
|
2531
2547
|
body: await parseBody(output.body, context),
|
|
2532
2548
|
};
|
|
2533
2549
|
let response;
|
|
2534
|
-
|
|
2535
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2550
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2536
2551
|
switch (errorCode) {
|
|
2537
2552
|
case "BadRequestException":
|
|
2538
2553
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2551,10 +2566,12 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
|
|
|
2551
2566
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2552
2567
|
default:
|
|
2553
2568
|
const parsedBody = parsedOutput.body;
|
|
2569
|
+
const $metadata = deserializeMetadata(output);
|
|
2570
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2554
2571
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2555
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2572
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2556
2573
|
$fault: "client",
|
|
2557
|
-
$metadata
|
|
2574
|
+
$metadata,
|
|
2558
2575
|
});
|
|
2559
2576
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2560
2577
|
}
|
|
@@ -2576,8 +2593,7 @@ const deserializeAws_restJson1DisassociateApiCommandError = async (output, conte
|
|
|
2576
2593
|
body: await parseBody(output.body, context),
|
|
2577
2594
|
};
|
|
2578
2595
|
let response;
|
|
2579
|
-
|
|
2580
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2596
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2581
2597
|
switch (errorCode) {
|
|
2582
2598
|
case "AccessDeniedException":
|
|
2583
2599
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2596,10 +2612,12 @@ const deserializeAws_restJson1DisassociateApiCommandError = async (output, conte
|
|
|
2596
2612
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2597
2613
|
default:
|
|
2598
2614
|
const parsedBody = parsedOutput.body;
|
|
2615
|
+
const $metadata = deserializeMetadata(output);
|
|
2616
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2599
2617
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2600
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2618
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2601
2619
|
$fault: "client",
|
|
2602
|
-
$metadata
|
|
2620
|
+
$metadata,
|
|
2603
2621
|
});
|
|
2604
2622
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2605
2623
|
}
|
|
@@ -2621,8 +2639,7 @@ const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context
|
|
|
2621
2639
|
body: await parseBody(output.body, context),
|
|
2622
2640
|
};
|
|
2623
2641
|
let response;
|
|
2624
|
-
|
|
2625
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2642
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2626
2643
|
switch (errorCode) {
|
|
2627
2644
|
case "BadRequestException":
|
|
2628
2645
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2641,10 +2658,12 @@ const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context
|
|
|
2641
2658
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2642
2659
|
default:
|
|
2643
2660
|
const parsedBody = parsedOutput.body;
|
|
2661
|
+
const $metadata = deserializeMetadata(output);
|
|
2662
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2644
2663
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2645
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2664
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2646
2665
|
$fault: "client",
|
|
2647
|
-
$metadata
|
|
2666
|
+
$metadata,
|
|
2648
2667
|
});
|
|
2649
2668
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2650
2669
|
}
|
|
@@ -2670,8 +2689,7 @@ const deserializeAws_restJson1GetApiAssociationCommandError = async (output, con
|
|
|
2670
2689
|
body: await parseBody(output.body, context),
|
|
2671
2690
|
};
|
|
2672
2691
|
let response;
|
|
2673
|
-
|
|
2674
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2692
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2675
2693
|
switch (errorCode) {
|
|
2676
2694
|
case "AccessDeniedException":
|
|
2677
2695
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2687,10 +2705,12 @@ const deserializeAws_restJson1GetApiAssociationCommandError = async (output, con
|
|
|
2687
2705
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2688
2706
|
default:
|
|
2689
2707
|
const parsedBody = parsedOutput.body;
|
|
2708
|
+
const $metadata = deserializeMetadata(output);
|
|
2709
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2690
2710
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2691
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2711
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2692
2712
|
$fault: "client",
|
|
2693
|
-
$metadata
|
|
2713
|
+
$metadata,
|
|
2694
2714
|
});
|
|
2695
2715
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2696
2716
|
}
|
|
@@ -2716,8 +2736,7 @@ const deserializeAws_restJson1GetApiCacheCommandError = async (output, context)
|
|
|
2716
2736
|
body: await parseBody(output.body, context),
|
|
2717
2737
|
};
|
|
2718
2738
|
let response;
|
|
2719
|
-
|
|
2720
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2739
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2721
2740
|
switch (errorCode) {
|
|
2722
2741
|
case "BadRequestException":
|
|
2723
2742
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2736,10 +2755,12 @@ const deserializeAws_restJson1GetApiCacheCommandError = async (output, context)
|
|
|
2736
2755
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2737
2756
|
default:
|
|
2738
2757
|
const parsedBody = parsedOutput.body;
|
|
2758
|
+
const $metadata = deserializeMetadata(output);
|
|
2759
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2739
2760
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2740
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2761
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2741
2762
|
$fault: "client",
|
|
2742
|
-
$metadata
|
|
2763
|
+
$metadata,
|
|
2743
2764
|
});
|
|
2744
2765
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2745
2766
|
}
|
|
@@ -2765,8 +2786,7 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
|
|
|
2765
2786
|
body: await parseBody(output.body, context),
|
|
2766
2787
|
};
|
|
2767
2788
|
let response;
|
|
2768
|
-
|
|
2769
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2789
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2770
2790
|
switch (errorCode) {
|
|
2771
2791
|
case "BadRequestException":
|
|
2772
2792
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -2785,10 +2805,12 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
|
|
|
2785
2805
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2786
2806
|
default:
|
|
2787
2807
|
const parsedBody = parsedOutput.body;
|
|
2808
|
+
const $metadata = deserializeMetadata(output);
|
|
2809
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2788
2810
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2789
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2811
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2790
2812
|
$fault: "client",
|
|
2791
|
-
$metadata
|
|
2813
|
+
$metadata,
|
|
2792
2814
|
});
|
|
2793
2815
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2794
2816
|
}
|
|
@@ -2814,8 +2836,7 @@ const deserializeAws_restJson1GetDomainNameCommandError = async (output, context
|
|
|
2814
2836
|
body: await parseBody(output.body, context),
|
|
2815
2837
|
};
|
|
2816
2838
|
let response;
|
|
2817
|
-
|
|
2818
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2839
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2819
2840
|
switch (errorCode) {
|
|
2820
2841
|
case "AccessDeniedException":
|
|
2821
2842
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2831,10 +2852,12 @@ const deserializeAws_restJson1GetDomainNameCommandError = async (output, context
|
|
|
2831
2852
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
2832
2853
|
default:
|
|
2833
2854
|
const parsedBody = parsedOutput.body;
|
|
2855
|
+
const $metadata = deserializeMetadata(output);
|
|
2856
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2834
2857
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2835
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2858
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2836
2859
|
$fault: "client",
|
|
2837
|
-
$metadata
|
|
2860
|
+
$metadata,
|
|
2838
2861
|
});
|
|
2839
2862
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2840
2863
|
}
|
|
@@ -2860,8 +2883,7 @@ const deserializeAws_restJson1GetFunctionCommandError = async (output, context)
|
|
|
2860
2883
|
body: await parseBody(output.body, context),
|
|
2861
2884
|
};
|
|
2862
2885
|
let response;
|
|
2863
|
-
|
|
2864
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2886
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2865
2887
|
switch (errorCode) {
|
|
2866
2888
|
case "ConcurrentModificationException":
|
|
2867
2889
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -2874,10 +2896,12 @@ const deserializeAws_restJson1GetFunctionCommandError = async (output, context)
|
|
|
2874
2896
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2875
2897
|
default:
|
|
2876
2898
|
const parsedBody = parsedOutput.body;
|
|
2899
|
+
const $metadata = deserializeMetadata(output);
|
|
2900
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2877
2901
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2878
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2902
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2879
2903
|
$fault: "client",
|
|
2880
|
-
$metadata
|
|
2904
|
+
$metadata,
|
|
2881
2905
|
});
|
|
2882
2906
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2883
2907
|
}
|
|
@@ -2903,8 +2927,7 @@ const deserializeAws_restJson1GetGraphqlApiCommandError = async (output, context
|
|
|
2903
2927
|
body: await parseBody(output.body, context),
|
|
2904
2928
|
};
|
|
2905
2929
|
let response;
|
|
2906
|
-
|
|
2907
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2930
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2908
2931
|
switch (errorCode) {
|
|
2909
2932
|
case "AccessDeniedException":
|
|
2910
2933
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -2923,10 +2946,12 @@ const deserializeAws_restJson1GetGraphqlApiCommandError = async (output, context
|
|
|
2923
2946
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2924
2947
|
default:
|
|
2925
2948
|
const parsedBody = parsedOutput.body;
|
|
2949
|
+
const $metadata = deserializeMetadata(output);
|
|
2950
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2926
2951
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2927
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2952
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2928
2953
|
$fault: "client",
|
|
2929
|
-
$metadata
|
|
2954
|
+
$metadata,
|
|
2930
2955
|
});
|
|
2931
2956
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2932
2957
|
}
|
|
@@ -2950,8 +2975,7 @@ const deserializeAws_restJson1GetIntrospectionSchemaCommandError = async (output
|
|
|
2950
2975
|
body: await parseBody(output.body, context),
|
|
2951
2976
|
};
|
|
2952
2977
|
let response;
|
|
2953
|
-
|
|
2954
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2978
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2955
2979
|
switch (errorCode) {
|
|
2956
2980
|
case "GraphQLSchemaException":
|
|
2957
2981
|
case "com.amazonaws.appsync#GraphQLSchemaException":
|
|
@@ -2967,10 +2991,12 @@ const deserializeAws_restJson1GetIntrospectionSchemaCommandError = async (output
|
|
|
2967
2991
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
2968
2992
|
default:
|
|
2969
2993
|
const parsedBody = parsedOutput.body;
|
|
2994
|
+
const $metadata = deserializeMetadata(output);
|
|
2995
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2970
2996
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
2971
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2997
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2972
2998
|
$fault: "client",
|
|
2973
|
-
$metadata
|
|
2999
|
+
$metadata,
|
|
2974
3000
|
});
|
|
2975
3001
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2976
3002
|
}
|
|
@@ -2996,8 +3022,7 @@ const deserializeAws_restJson1GetResolverCommandError = async (output, context)
|
|
|
2996
3022
|
body: await parseBody(output.body, context),
|
|
2997
3023
|
};
|
|
2998
3024
|
let response;
|
|
2999
|
-
|
|
3000
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3025
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3001
3026
|
switch (errorCode) {
|
|
3002
3027
|
case "ConcurrentModificationException":
|
|
3003
3028
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -3010,10 +3035,12 @@ const deserializeAws_restJson1GetResolverCommandError = async (output, context)
|
|
|
3010
3035
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3011
3036
|
default:
|
|
3012
3037
|
const parsedBody = parsedOutput.body;
|
|
3038
|
+
const $metadata = deserializeMetadata(output);
|
|
3039
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3013
3040
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3014
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3041
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3015
3042
|
$fault: "client",
|
|
3016
|
-
$metadata
|
|
3043
|
+
$metadata,
|
|
3017
3044
|
});
|
|
3018
3045
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3019
3046
|
}
|
|
@@ -3043,8 +3070,7 @@ const deserializeAws_restJson1GetSchemaCreationStatusCommandError = async (outpu
|
|
|
3043
3070
|
body: await parseBody(output.body, context),
|
|
3044
3071
|
};
|
|
3045
3072
|
let response;
|
|
3046
|
-
|
|
3047
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3073
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3048
3074
|
switch (errorCode) {
|
|
3049
3075
|
case "BadRequestException":
|
|
3050
3076
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3060,10 +3086,12 @@ const deserializeAws_restJson1GetSchemaCreationStatusCommandError = async (outpu
|
|
|
3060
3086
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3061
3087
|
default:
|
|
3062
3088
|
const parsedBody = parsedOutput.body;
|
|
3089
|
+
const $metadata = deserializeMetadata(output);
|
|
3090
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3063
3091
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3064
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3092
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3065
3093
|
$fault: "client",
|
|
3066
|
-
$metadata
|
|
3094
|
+
$metadata,
|
|
3067
3095
|
});
|
|
3068
3096
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3069
3097
|
}
|
|
@@ -3089,8 +3117,7 @@ const deserializeAws_restJson1GetTypeCommandError = async (output, context) => {
|
|
|
3089
3117
|
body: await parseBody(output.body, context),
|
|
3090
3118
|
};
|
|
3091
3119
|
let response;
|
|
3092
|
-
|
|
3093
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3120
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3094
3121
|
switch (errorCode) {
|
|
3095
3122
|
case "BadRequestException":
|
|
3096
3123
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3109,10 +3136,12 @@ const deserializeAws_restJson1GetTypeCommandError = async (output, context) => {
|
|
|
3109
3136
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3110
3137
|
default:
|
|
3111
3138
|
const parsedBody = parsedOutput.body;
|
|
3139
|
+
const $metadata = deserializeMetadata(output);
|
|
3140
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3112
3141
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3113
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3142
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3114
3143
|
$fault: "client",
|
|
3115
|
-
$metadata
|
|
3144
|
+
$metadata,
|
|
3116
3145
|
});
|
|
3117
3146
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3118
3147
|
}
|
|
@@ -3142,8 +3171,7 @@ const deserializeAws_restJson1ListApiKeysCommandError = async (output, context)
|
|
|
3142
3171
|
body: await parseBody(output.body, context),
|
|
3143
3172
|
};
|
|
3144
3173
|
let response;
|
|
3145
|
-
|
|
3146
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3174
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3147
3175
|
switch (errorCode) {
|
|
3148
3176
|
case "BadRequestException":
|
|
3149
3177
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3159,10 +3187,12 @@ const deserializeAws_restJson1ListApiKeysCommandError = async (output, context)
|
|
|
3159
3187
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3160
3188
|
default:
|
|
3161
3189
|
const parsedBody = parsedOutput.body;
|
|
3190
|
+
const $metadata = deserializeMetadata(output);
|
|
3191
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3162
3192
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3163
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3193
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3164
3194
|
$fault: "client",
|
|
3165
|
-
$metadata
|
|
3195
|
+
$metadata,
|
|
3166
3196
|
});
|
|
3167
3197
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3168
3198
|
}
|
|
@@ -3192,8 +3222,7 @@ const deserializeAws_restJson1ListDataSourcesCommandError = async (output, conte
|
|
|
3192
3222
|
body: await parseBody(output.body, context),
|
|
3193
3223
|
};
|
|
3194
3224
|
let response;
|
|
3195
|
-
|
|
3196
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3225
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3197
3226
|
switch (errorCode) {
|
|
3198
3227
|
case "BadRequestException":
|
|
3199
3228
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3209,10 +3238,12 @@ const deserializeAws_restJson1ListDataSourcesCommandError = async (output, conte
|
|
|
3209
3238
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3210
3239
|
default:
|
|
3211
3240
|
const parsedBody = parsedOutput.body;
|
|
3241
|
+
const $metadata = deserializeMetadata(output);
|
|
3242
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3212
3243
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3213
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3244
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3214
3245
|
$fault: "client",
|
|
3215
|
-
$metadata
|
|
3246
|
+
$metadata,
|
|
3216
3247
|
});
|
|
3217
3248
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3218
3249
|
}
|
|
@@ -3242,8 +3273,7 @@ const deserializeAws_restJson1ListDomainNamesCommandError = async (output, conte
|
|
|
3242
3273
|
body: await parseBody(output.body, context),
|
|
3243
3274
|
};
|
|
3244
3275
|
let response;
|
|
3245
|
-
|
|
3246
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3276
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3247
3277
|
switch (errorCode) {
|
|
3248
3278
|
case "AccessDeniedException":
|
|
3249
3279
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -3256,10 +3286,12 @@ const deserializeAws_restJson1ListDomainNamesCommandError = async (output, conte
|
|
|
3256
3286
|
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
3257
3287
|
default:
|
|
3258
3288
|
const parsedBody = parsedOutput.body;
|
|
3289
|
+
const $metadata = deserializeMetadata(output);
|
|
3290
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3259
3291
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3260
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3292
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3261
3293
|
$fault: "client",
|
|
3262
|
-
$metadata
|
|
3294
|
+
$metadata,
|
|
3263
3295
|
});
|
|
3264
3296
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3265
3297
|
}
|
|
@@ -3289,8 +3321,7 @@ const deserializeAws_restJson1ListFunctionsCommandError = async (output, context
|
|
|
3289
3321
|
body: await parseBody(output.body, context),
|
|
3290
3322
|
};
|
|
3291
3323
|
let response;
|
|
3292
|
-
|
|
3293
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3324
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3294
3325
|
switch (errorCode) {
|
|
3295
3326
|
case "BadRequestException":
|
|
3296
3327
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3306,10 +3337,12 @@ const deserializeAws_restJson1ListFunctionsCommandError = async (output, context
|
|
|
3306
3337
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3307
3338
|
default:
|
|
3308
3339
|
const parsedBody = parsedOutput.body;
|
|
3340
|
+
const $metadata = deserializeMetadata(output);
|
|
3341
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3309
3342
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3310
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3343
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3311
3344
|
$fault: "client",
|
|
3312
|
-
$metadata
|
|
3345
|
+
$metadata,
|
|
3313
3346
|
});
|
|
3314
3347
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3315
3348
|
}
|
|
@@ -3339,8 +3372,7 @@ const deserializeAws_restJson1ListGraphqlApisCommandError = async (output, conte
|
|
|
3339
3372
|
body: await parseBody(output.body, context),
|
|
3340
3373
|
};
|
|
3341
3374
|
let response;
|
|
3342
|
-
|
|
3343
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3375
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3344
3376
|
switch (errorCode) {
|
|
3345
3377
|
case "BadRequestException":
|
|
3346
3378
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3353,10 +3385,12 @@ const deserializeAws_restJson1ListGraphqlApisCommandError = async (output, conte
|
|
|
3353
3385
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3354
3386
|
default:
|
|
3355
3387
|
const parsedBody = parsedOutput.body;
|
|
3388
|
+
const $metadata = deserializeMetadata(output);
|
|
3389
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3356
3390
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3357
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3391
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3358
3392
|
$fault: "client",
|
|
3359
|
-
$metadata
|
|
3393
|
+
$metadata,
|
|
3360
3394
|
});
|
|
3361
3395
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3362
3396
|
}
|
|
@@ -3386,8 +3420,7 @@ const deserializeAws_restJson1ListResolversCommandError = async (output, context
|
|
|
3386
3420
|
body: await parseBody(output.body, context),
|
|
3387
3421
|
};
|
|
3388
3422
|
let response;
|
|
3389
|
-
|
|
3390
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3423
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3391
3424
|
switch (errorCode) {
|
|
3392
3425
|
case "BadRequestException":
|
|
3393
3426
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3403,10 +3436,12 @@ const deserializeAws_restJson1ListResolversCommandError = async (output, context
|
|
|
3403
3436
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3404
3437
|
default:
|
|
3405
3438
|
const parsedBody = parsedOutput.body;
|
|
3439
|
+
const $metadata = deserializeMetadata(output);
|
|
3440
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3406
3441
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3407
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3442
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3408
3443
|
$fault: "client",
|
|
3409
|
-
$metadata
|
|
3444
|
+
$metadata,
|
|
3410
3445
|
});
|
|
3411
3446
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3412
3447
|
}
|
|
@@ -3436,8 +3471,7 @@ const deserializeAws_restJson1ListResolversByFunctionCommandError = async (outpu
|
|
|
3436
3471
|
body: await parseBody(output.body, context),
|
|
3437
3472
|
};
|
|
3438
3473
|
let response;
|
|
3439
|
-
|
|
3440
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3474
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3441
3475
|
switch (errorCode) {
|
|
3442
3476
|
case "BadRequestException":
|
|
3443
3477
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3453,10 +3487,12 @@ const deserializeAws_restJson1ListResolversByFunctionCommandError = async (outpu
|
|
|
3453
3487
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3454
3488
|
default:
|
|
3455
3489
|
const parsedBody = parsedOutput.body;
|
|
3490
|
+
const $metadata = deserializeMetadata(output);
|
|
3491
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3456
3492
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3457
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3493
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3458
3494
|
$fault: "client",
|
|
3459
|
-
$metadata
|
|
3495
|
+
$metadata,
|
|
3460
3496
|
});
|
|
3461
3497
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3462
3498
|
}
|
|
@@ -3482,8 +3518,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3482
3518
|
body: await parseBody(output.body, context),
|
|
3483
3519
|
};
|
|
3484
3520
|
let response;
|
|
3485
|
-
|
|
3486
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3521
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3487
3522
|
switch (errorCode) {
|
|
3488
3523
|
case "AccessDeniedException":
|
|
3489
3524
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -3505,10 +3540,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3505
3540
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3506
3541
|
default:
|
|
3507
3542
|
const parsedBody = parsedOutput.body;
|
|
3543
|
+
const $metadata = deserializeMetadata(output);
|
|
3544
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3508
3545
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3509
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3546
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3510
3547
|
$fault: "client",
|
|
3511
|
-
$metadata
|
|
3548
|
+
$metadata,
|
|
3512
3549
|
});
|
|
3513
3550
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3514
3551
|
}
|
|
@@ -3538,8 +3575,7 @@ const deserializeAws_restJson1ListTypesCommandError = async (output, context) =>
|
|
|
3538
3575
|
body: await parseBody(output.body, context),
|
|
3539
3576
|
};
|
|
3540
3577
|
let response;
|
|
3541
|
-
|
|
3542
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3578
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3543
3579
|
switch (errorCode) {
|
|
3544
3580
|
case "BadRequestException":
|
|
3545
3581
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3558,10 +3594,12 @@ const deserializeAws_restJson1ListTypesCommandError = async (output, context) =>
|
|
|
3558
3594
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3559
3595
|
default:
|
|
3560
3596
|
const parsedBody = parsedOutput.body;
|
|
3597
|
+
const $metadata = deserializeMetadata(output);
|
|
3598
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3561
3599
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3562
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3600
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3563
3601
|
$fault: "client",
|
|
3564
|
-
$metadata
|
|
3602
|
+
$metadata,
|
|
3565
3603
|
});
|
|
3566
3604
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3567
3605
|
}
|
|
@@ -3587,8 +3625,7 @@ const deserializeAws_restJson1StartSchemaCreationCommandError = async (output, c
|
|
|
3587
3625
|
body: await parseBody(output.body, context),
|
|
3588
3626
|
};
|
|
3589
3627
|
let response;
|
|
3590
|
-
|
|
3591
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3628
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3592
3629
|
switch (errorCode) {
|
|
3593
3630
|
case "BadRequestException":
|
|
3594
3631
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3607,10 +3644,12 @@ const deserializeAws_restJson1StartSchemaCreationCommandError = async (output, c
|
|
|
3607
3644
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3608
3645
|
default:
|
|
3609
3646
|
const parsedBody = parsedOutput.body;
|
|
3647
|
+
const $metadata = deserializeMetadata(output);
|
|
3648
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3610
3649
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3611
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3650
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3612
3651
|
$fault: "client",
|
|
3613
|
-
$metadata
|
|
3652
|
+
$metadata,
|
|
3614
3653
|
});
|
|
3615
3654
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3616
3655
|
}
|
|
@@ -3632,8 +3671,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3632
3671
|
body: await parseBody(output.body, context),
|
|
3633
3672
|
};
|
|
3634
3673
|
let response;
|
|
3635
|
-
|
|
3636
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3674
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3637
3675
|
switch (errorCode) {
|
|
3638
3676
|
case "AccessDeniedException":
|
|
3639
3677
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -3655,10 +3693,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3655
3693
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3656
3694
|
default:
|
|
3657
3695
|
const parsedBody = parsedOutput.body;
|
|
3696
|
+
const $metadata = deserializeMetadata(output);
|
|
3697
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3658
3698
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3659
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3699
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3660
3700
|
$fault: "client",
|
|
3661
|
-
$metadata
|
|
3701
|
+
$metadata,
|
|
3662
3702
|
});
|
|
3663
3703
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3664
3704
|
}
|
|
@@ -3680,8 +3720,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3680
3720
|
body: await parseBody(output.body, context),
|
|
3681
3721
|
};
|
|
3682
3722
|
let response;
|
|
3683
|
-
|
|
3684
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3723
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3685
3724
|
switch (errorCode) {
|
|
3686
3725
|
case "AccessDeniedException":
|
|
3687
3726
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -3703,10 +3742,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3703
3742
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3704
3743
|
default:
|
|
3705
3744
|
const parsedBody = parsedOutput.body;
|
|
3745
|
+
const $metadata = deserializeMetadata(output);
|
|
3746
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3706
3747
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3707
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3748
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3708
3749
|
$fault: "client",
|
|
3709
|
-
$metadata
|
|
3750
|
+
$metadata,
|
|
3710
3751
|
});
|
|
3711
3752
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3712
3753
|
}
|
|
@@ -3732,8 +3773,7 @@ const deserializeAws_restJson1UpdateApiCacheCommandError = async (output, contex
|
|
|
3732
3773
|
body: await parseBody(output.body, context),
|
|
3733
3774
|
};
|
|
3734
3775
|
let response;
|
|
3735
|
-
|
|
3736
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3776
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3737
3777
|
switch (errorCode) {
|
|
3738
3778
|
case "BadRequestException":
|
|
3739
3779
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3752,10 +3792,12 @@ const deserializeAws_restJson1UpdateApiCacheCommandError = async (output, contex
|
|
|
3752
3792
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3753
3793
|
default:
|
|
3754
3794
|
const parsedBody = parsedOutput.body;
|
|
3795
|
+
const $metadata = deserializeMetadata(output);
|
|
3796
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3755
3797
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3756
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3798
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3757
3799
|
$fault: "client",
|
|
3758
|
-
$metadata
|
|
3800
|
+
$metadata,
|
|
3759
3801
|
});
|
|
3760
3802
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3761
3803
|
}
|
|
@@ -3781,8 +3823,7 @@ const deserializeAws_restJson1UpdateApiKeyCommandError = async (output, context)
|
|
|
3781
3823
|
body: await parseBody(output.body, context),
|
|
3782
3824
|
};
|
|
3783
3825
|
let response;
|
|
3784
|
-
|
|
3785
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3826
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3786
3827
|
switch (errorCode) {
|
|
3787
3828
|
case "ApiKeyValidityOutOfBoundsException":
|
|
3788
3829
|
case "com.amazonaws.appsync#ApiKeyValidityOutOfBoundsException":
|
|
@@ -3804,10 +3845,12 @@ const deserializeAws_restJson1UpdateApiKeyCommandError = async (output, context)
|
|
|
3804
3845
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3805
3846
|
default:
|
|
3806
3847
|
const parsedBody = parsedOutput.body;
|
|
3848
|
+
const $metadata = deserializeMetadata(output);
|
|
3849
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3807
3850
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3808
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3851
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3809
3852
|
$fault: "client",
|
|
3810
|
-
$metadata
|
|
3853
|
+
$metadata,
|
|
3811
3854
|
});
|
|
3812
3855
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3813
3856
|
}
|
|
@@ -3833,8 +3876,7 @@ const deserializeAws_restJson1UpdateDataSourceCommandError = async (output, cont
|
|
|
3833
3876
|
body: await parseBody(output.body, context),
|
|
3834
3877
|
};
|
|
3835
3878
|
let response;
|
|
3836
|
-
|
|
3837
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3879
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3838
3880
|
switch (errorCode) {
|
|
3839
3881
|
case "BadRequestException":
|
|
3840
3882
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -3853,10 +3895,12 @@ const deserializeAws_restJson1UpdateDataSourceCommandError = async (output, cont
|
|
|
3853
3895
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3854
3896
|
default:
|
|
3855
3897
|
const parsedBody = parsedOutput.body;
|
|
3898
|
+
const $metadata = deserializeMetadata(output);
|
|
3899
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3856
3900
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3857
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3901
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3858
3902
|
$fault: "client",
|
|
3859
|
-
$metadata
|
|
3903
|
+
$metadata,
|
|
3860
3904
|
});
|
|
3861
3905
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3862
3906
|
}
|
|
@@ -3882,8 +3926,7 @@ const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, cont
|
|
|
3882
3926
|
body: await parseBody(output.body, context),
|
|
3883
3927
|
};
|
|
3884
3928
|
let response;
|
|
3885
|
-
|
|
3886
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3929
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3887
3930
|
switch (errorCode) {
|
|
3888
3931
|
case "AccessDeniedException":
|
|
3889
3932
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -3902,10 +3945,12 @@ const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, cont
|
|
|
3902
3945
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
3903
3946
|
default:
|
|
3904
3947
|
const parsedBody = parsedOutput.body;
|
|
3948
|
+
const $metadata = deserializeMetadata(output);
|
|
3949
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3905
3950
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3906
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3951
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3907
3952
|
$fault: "client",
|
|
3908
|
-
$metadata
|
|
3953
|
+
$metadata,
|
|
3909
3954
|
});
|
|
3910
3955
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3911
3956
|
}
|
|
@@ -3931,8 +3976,7 @@ const deserializeAws_restJson1UpdateFunctionCommandError = async (output, contex
|
|
|
3931
3976
|
body: await parseBody(output.body, context),
|
|
3932
3977
|
};
|
|
3933
3978
|
let response;
|
|
3934
|
-
|
|
3935
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3979
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3936
3980
|
switch (errorCode) {
|
|
3937
3981
|
case "ConcurrentModificationException":
|
|
3938
3982
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -3948,10 +3992,12 @@ const deserializeAws_restJson1UpdateFunctionCommandError = async (output, contex
|
|
|
3948
3992
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
3949
3993
|
default:
|
|
3950
3994
|
const parsedBody = parsedOutput.body;
|
|
3995
|
+
const $metadata = deserializeMetadata(output);
|
|
3996
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
3951
3997
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
3952
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3998
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
3953
3999
|
$fault: "client",
|
|
3954
|
-
$metadata
|
|
4000
|
+
$metadata,
|
|
3955
4001
|
});
|
|
3956
4002
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3957
4003
|
}
|
|
@@ -3977,8 +4023,7 @@ const deserializeAws_restJson1UpdateGraphqlApiCommandError = async (output, cont
|
|
|
3977
4023
|
body: await parseBody(output.body, context),
|
|
3978
4024
|
};
|
|
3979
4025
|
let response;
|
|
3980
|
-
|
|
3981
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4026
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3982
4027
|
switch (errorCode) {
|
|
3983
4028
|
case "AccessDeniedException":
|
|
3984
4029
|
case "com.amazonaws.appsync#AccessDeniedException":
|
|
@@ -4000,10 +4045,12 @@ const deserializeAws_restJson1UpdateGraphqlApiCommandError = async (output, cont
|
|
|
4000
4045
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
4001
4046
|
default:
|
|
4002
4047
|
const parsedBody = parsedOutput.body;
|
|
4048
|
+
const $metadata = deserializeMetadata(output);
|
|
4049
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
4003
4050
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
4004
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4051
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4005
4052
|
$fault: "client",
|
|
4006
|
-
$metadata
|
|
4053
|
+
$metadata,
|
|
4007
4054
|
});
|
|
4008
4055
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4009
4056
|
}
|
|
@@ -4029,8 +4076,7 @@ const deserializeAws_restJson1UpdateResolverCommandError = async (output, contex
|
|
|
4029
4076
|
body: await parseBody(output.body, context),
|
|
4030
4077
|
};
|
|
4031
4078
|
let response;
|
|
4032
|
-
|
|
4033
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4079
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4034
4080
|
switch (errorCode) {
|
|
4035
4081
|
case "ConcurrentModificationException":
|
|
4036
4082
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
@@ -4046,10 +4092,12 @@ const deserializeAws_restJson1UpdateResolverCommandError = async (output, contex
|
|
|
4046
4092
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
4047
4093
|
default:
|
|
4048
4094
|
const parsedBody = parsedOutput.body;
|
|
4095
|
+
const $metadata = deserializeMetadata(output);
|
|
4096
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
4049
4097
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
4050
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4098
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4051
4099
|
$fault: "client",
|
|
4052
|
-
$metadata
|
|
4100
|
+
$metadata,
|
|
4053
4101
|
});
|
|
4054
4102
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4055
4103
|
}
|
|
@@ -4075,8 +4123,7 @@ const deserializeAws_restJson1UpdateTypeCommandError = async (output, context) =
|
|
|
4075
4123
|
body: await parseBody(output.body, context),
|
|
4076
4124
|
};
|
|
4077
4125
|
let response;
|
|
4078
|
-
|
|
4079
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4126
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4080
4127
|
switch (errorCode) {
|
|
4081
4128
|
case "BadRequestException":
|
|
4082
4129
|
case "com.amazonaws.appsync#BadRequestException":
|
|
@@ -4095,10 +4142,12 @@ const deserializeAws_restJson1UpdateTypeCommandError = async (output, context) =
|
|
|
4095
4142
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
4096
4143
|
default:
|
|
4097
4144
|
const parsedBody = parsedOutput.body;
|
|
4145
|
+
const $metadata = deserializeMetadata(output);
|
|
4146
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
4098
4147
|
response = new AppSyncServiceException_1.AppSyncServiceException({
|
|
4099
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4148
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
4100
4149
|
$fault: "client",
|
|
4101
|
-
$metadata
|
|
4150
|
+
$metadata,
|
|
4102
4151
|
});
|
|
4103
4152
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4104
4153
|
}
|
|
@@ -4933,5 +4982,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
4933
4982
|
if (data["__type"] !== undefined) {
|
|
4934
4983
|
return sanitizeErrorCode(data["__type"]);
|
|
4935
4984
|
}
|
|
4936
|
-
return "";
|
|
4937
4985
|
};
|