This file contains hidden or 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
zhuLiDoTheThing(args) | |
// Application status codes can come from HTTP 2xx, 4xx, and 5xx responses. This `.then()` will attempt to resolve | |
// to Promise<codeString> or reject with an error if the code is missing from the response body. | |
.then( | |
response => { | |
if (response.code) { | |
// Forward the code from the response | |
return response.code; | |
} | |