-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial tests for better exception handling
- Loading branch information
Showing
16 changed files
with
156 additions
and
4 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
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
Empty file.
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,64 @@ | ||
<html> | ||
|
||
<head> | ||
<style> | ||
body { | ||
font-family: Circular, "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
color: rgb(72, 72, 72); | ||
} | ||
</style> | ||
</head> | ||
|
||
<body style="margin:0;padding:0"> | ||
<div style="padding: 20px 25px 20px 20px"> <svg version="1.1" x="0px" y="0px" viewBox="0 0 150 150" | ||
xml:space="preserve" width="150" height="150" xmlns="http://www.w3.org/2000/svg" | ||
xmlns:svg="http://www.w3.org/2000/svg" xmlns:i="&ns_ai;"> | ||
<style type="text/css" id="style18"> | ||
.st0 { | ||
fill: none; | ||
} | ||
|
||
.st1 { | ||
fill: #3D423D; | ||
} | ||
|
||
.st2 { | ||
fill: #8C918C; | ||
} | ||
|
||
.st3 { | ||
fill: #C8D419; | ||
} | ||
|
||
.st4 { | ||
fill: #F39200; | ||
} | ||
</style> | ||
<switch id="switch40"> | ||
<foreignObject requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/" x="0" y="0" width="1" | ||
height="1"></foreignObject> | ||
<g i:extraneous="self" id="g38"> | ||
<rect class="st0" width="965.29999" height="265.29999" id="rect20" x="0" y="0" /> | ||
<g id="g36" style="display:inline"> | ||
<g id="g34" transform="translate(-68.977383,-46.879183)"> | ||
<g id="g32"> | ||
<polygon class="st3" points="87.2,88.9 203.6,88.9 145.4,59.3 " id="polygon26" /> | ||
<polygon class="st4" points="203.6,160.8 203.6,88.9 149.8,182.7 " id="polygon28" /> | ||
<polygon class="st3" points="87.2,160.9 87.2,88.9 145.4,160.9 " id="polygon30" /> | ||
</g> | ||
</g> | ||
</g> | ||
<polygon class="st2" points="87.2,160.9 145.4,59.3 87.2,88.9 " id="polygon24" | ||
style="fill:#8c918c;fill-opacity:0.847297" transform="translate(-68.977383,-46.879183)" /> | ||
</g> | ||
</switch> | ||
</svg> </div> | ||
<div | ||
style="padding: 100px;text-align: center;font-size: 40px;background-color: #eeeeee;border-bottom: 2px solid #dddddd;border-top: 2px solid #dddddd"> | ||
<span style="font-64px: size;font-weight: bold">Oops !</span><br /> | ||
Our service is down for maintenance.<br />Please try again later.<br /> <br /> <span | ||
style="font-64px: size;font-weight: bold;color: #bbbbbb">503</span> | ||
</div> | ||
</body> | ||
|
||
</html> |
4 changes: 4 additions & 0 deletions
4
tests/fixtures/exceptions/cloud/access-denied-to-gateway.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,4 @@ | ||
{ | ||
"errorCode": "RESOURCE_ACCESS_DENIED", | ||
"error": "Access denied to gateway #1234-5678-1234 for action ADD_TOKEN" | ||
} |
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,4 @@ | ||
{ | ||
"errorCode": "AUTHENTICATION_ERROR", | ||
"error": "Bad credentials" | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/fixtures/exceptions/cloud/missing-authorization-token.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,4 @@ | ||
{ | ||
"error": "Missing authorization token.", | ||
"errorCode": "RESOURCE_ACCESS_DENIED" | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/fixtures/exceptions/cloud/no-registered-event-listener.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,4 @@ | ||
{ | ||
"error": "\"No registered event listener.\"", | ||
"errorCode": "UNSPECIFIED_ERROR" | ||
} |
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,4 @@ | ||
{ | ||
"errorCode": "RESOURCE_ACCESS_DENIED", | ||
"error": "Not authenticated" | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/fixtures/exceptions/cloud/too-many-concurrent-requests.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,4 @@ | ||
{ | ||
"errorCode": "RESOURCE_ACCESS_DENIED", | ||
"error": "too many concurrent requests" | ||
} |
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,3 @@ | ||
{ | ||
"error": "Server busy, please try again later. (Too many executions)" | ||
} |
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,4 @@ | ||
{ | ||
"errorCode": "AUTHENTICATION_ERROR", | ||
"error": "Too many requests, try again later : login with xxx@xxx.tld" | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/fixtures/exceptions/local/no-registered-event-listener.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,4 @@ | ||
{ | ||
"errorCode": "UNSPECIFIED_ERROR", | ||
"error": "No registered event listener" | ||
} |
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,4 @@ | ||
{ | ||
"error": "Not authenticated.", | ||
"errorCode": "RESOURCE_ACCESS_DENIED" | ||
} |
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,4 @@ | ||
{ | ||
"error": "Unknown object.", | ||
"errorCode": "UNSPECIFIED_ERROR" | ||
} |
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