This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PT-1036 - Updated services_documentation to include support for error…
… messages and added error messages to active custom services resources.
- Loading branch information
1 parent
ff9472f
commit 26a52bf
Showing
17 changed files
with
297 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...custom/petitions_api/api_petitions/example_responses/api_petitions_index.response599.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "599", | ||
"developerMessage:": "Sorry. Something went wrong. We're not sure what. And we're not sure 599 is an accurate status code for your error. Please file a ticket in the issue queue to help us understand what caused this error: https://github.com/whitehouse/petitions/issues?state=open", | ||
"userMessage": "", | ||
"errorCode": "", | ||
"moreInfo": "" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...itions_api/api_petitions/example_responses/api_petitions_load_signatures.response599.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "599", | ||
"developerMessage:": "Class could not be instantiated.", | ||
"userMessage": "The resource that you requested is temporarily unavailable.", | ||
"errorCode": "83", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#petitions-signatures-error-599" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...tom/petitions_api/api_petitions/example_responses/api_petitions_retrieve.response404.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "404", | ||
"developerMessage:": "Petition {petition_id} not found.", | ||
"userMessage": "The petition that you requested does not exist.", | ||
"errorCode": "84", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#petitions-retrieve-error-404" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...tom/petitions_api/api_petitions/example_responses/api_petitions_retrieve.response599.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "599", | ||
"developerMessage:": "Class could not be instantiated.", | ||
"userMessage": "The resource that you requested is temporarily unavailable.", | ||
"errorCode": "83", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#petitions-retrieve-error-599" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
modules/custom/petitions_api/api_signatures/examples/api_signatures_create.response400.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "400", | ||
"developerMessage:": "Missing required fields. These fields are required: signature_source_api_key, petition_id, email, first_name, last_name.", | ||
"userMessage": "Missing required fields. These fields are required: signature_source_api_key, petition_id, email, first_name, last_name.", | ||
"errorCode": "75", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#signatures-create-error-400" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/custom/petitions_api/api_signatures/examples/api_signatures_create.response401.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "401", | ||
"developerMessage:": "Invalid key.", | ||
"userMessage": "The key provided is not valid.", | ||
"errorCode": "85", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#signatures-create-error-401" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/custom/petitions_api/api_signatures/examples/api_signatures_create.response403.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "403", | ||
"developerMessage:": "Petition {petition_id} cannot accept more signatures. (If you believe this petition was not open for a full 30 days, it's possible that it was flagged and removed for violation of terms of service.)", | ||
"userMessage": "This petition cannot accept more signatures. You can open a new petition on this issue here: https://edit.dev8.petitions.whitehouse.gov/.", | ||
"errorCode": "74", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#signatures-create-error-403" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/custom/petitions_api/api_signatures/examples/api_signatures_create.response404.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"metadata": { | ||
"responseInfo": { | ||
"status": "404", | ||
"developerMessage:": "No such petition {petition_id}.", | ||
"userMessage": "The petition you are trying to sign doesn't exist.", | ||
"errorCode": "76", | ||
"moreInfo": "See the documentation: https://petitions.whitehouse.gov/developers#signatures-create-error-404" | ||
} | ||
} | ||
} |
Oops, something went wrong.