Skip to content

Commit b498fd5

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 6643 b: refs/heads/tswast-patch-1 c: 0eada88 h: refs/heads/master i: 6641: eece32e 6639: 396bcc0
1 parent 6ce11bd commit b498fd5

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 1e7e1526235e7c6192ae585f93a740ba762f2ab3
60+
refs/heads/tswast-patch-1: 0eada880fe940622e97fcfd493df23378d3c43bc
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ public static ProjectListOption fields(ProjectField... fields) {
213213
/**
214214
* Retrieves the project identified by the specified project ID.
215215
*
216-
* <p>The caller must have read permissions for this project. Returns {@code null} if project
217-
* not found.
216+
* <p>Returns {@code null} if the project is not found or if the user doesn't have read
217+
* permissions for the project.
218218
*
219219
* @see <a
220220
* href="https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects/get">Cloud

branches/tswast-patch-1/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/spi/DefaultResourceManagerRpc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public Project get(String projectId, Map<Option, ?> options) throws ResourceMana
8989
} catch (IOException ex) {
9090
ResourceManagerException translated = translate(ex);
9191
if (translated.code() == HTTP_FORBIDDEN || translated.code() == HTTP_NOT_FOUND) {
92-
return null; // Project not found
92+
// Service can return either 403 or 404 to signify that the project doesn't exist.
93+
return null;
9394
} else {
9495
throw translated;
9596
}

0 commit comments

Comments
 (0)