Skip to content

Commit a6dd0be

Browse files
author
Dan Tolbert
committed
update readme and package-lock
1 parent e7d0b56 commit a6dd0be

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,8 @@ const data = {
873873

874874
try {
875875
const csrOrderResponse = await CsrOrder.createAsync(data);
876-
console.log(csrOrderResponse);
876+
console.log(csrOrderResponse.orderId);
877+
//31e0b16b-4720-4f2e-bb99-1399eeb2ff9e
877878
}
878879
catch (e) {
879880
console.log(e);
@@ -882,15 +883,39 @@ catch (e) {
882883

883884
### Fetch Existing CSR Order
884885

886+
If the CSR order is in an FAILED state, the SDK will throw an error
887+
888+
#### COMPLETE or PROCESSING resposne
889+
885890
```js
886891
const csrOrderId = "1234-abc"
887892

888893
try {
889894
const csrOrderData = await CsrOrder.getAsync(csrOrderId);
890-
console.log(csrOrderData);
895+
console.log(csrOrderData.status);
896+
//COMPLETE
891897
}
892898
catch (e) {
893899
console.log(e);
894900
}
895901
```
896902

903+
#### FAILED response
904+
905+
```js
906+
const csrOrderId = "1234-abc"
907+
908+
try {
909+
const csrOrderData = await CsrOrder.getAsync(csrOrderId);
910+
console.log(csrOrderData.status);
911+
//Won't fire, as request is failed
912+
}
913+
catch (e) {
914+
console.log(e);
915+
// [BandwidthError: CSR is not available for this TN] {
916+
// code: 26500,
917+
// message: 'CSR is not available for this TN',
918+
// httpStatus: 200
919+
// }
920+
}
921+
```

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)