Skip to content

Commit c32f99c

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 2065 b: refs/heads/pubsub-alpha c: 0eada88 h: refs/heads/master i: 2063: 0b69450
1 parent 3c17bee commit c32f99c

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
@@ -3,7 +3,7 @@ refs/heads/master: 689bbb466df4b2d5d2483d6edb8ac5c7c7f7c6fa
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
6-
refs/heads/pubsub-alpha: 1e7e1526235e7c6192ae585f93a740ba762f2ab3
6+
refs/heads/pubsub-alpha: 0eada880fe940622e97fcfd493df23378d3c43bc
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
88
refs/heads/update-datastore: 482954f2c5055231e5b3122ea91d2ba00ce8187c
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

branches/pubsub-alpha/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/pubsub-alpha/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)