mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(neptune): throw a mappable capacity fault when the proxy-port range is exhausted (#1879)
allocateProxyPort threw AwsException("InsufficientNeptuneCapacity"), a code
that does not exist in Neptune's API, so the SDK could not map it and callers
got a generic NeptuneException. Use the wire code InsufficientStorageClusterCapacity
(the InsufficientStorageClusterCapacityFault that CreateDBCluster declares), 400,
so the SDK deserializes it to a typed exception.
This commit is contained in:
1 parent
83fcd12f1c
commit
fe531e2be8
2 files changed
+22
-3
No files matched your search
@@ -308,8 +308,11 @@ public class NeptuneService {
|
||||
return port;
|
||||
}
|
||||
}
|
||||
throw new AwsException("InsufficientNeptuneCapacity",
|
||||
"No available proxy ports in range " + base + "-" + max, 503);
|
||||
// Wire code the SDK maps to InsufficientStorageClusterCapacityFault (the only
|
||||
// capacity fault CreateDBCluster declares); "InsufficientNeptuneCapacity" isn't a
|
||||
// real Neptune code, so callers got an unmapped generic NeptuneException.
|
||||
throw new AwsException("InsufficientStorageClusterCapacity",
|
||||
"No available proxy ports in range " + base + "-" + max, 400);
|
||||
}
|
||||
|
||||
private void releaseProxyPort(int port) {
|
||||
|
||||
Reference in new issue
Block a user