Skip to content

Commit a8b3fbc

Browse files
authored
Merge pull request #326 from signalwire/Devon/messaging-error-codes
message-logs: add error_message and error_code to MessageLog response
2 parents 4678afb + 6cab18a commit a8b3fbc

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

fern/apis/signalwire-rest/openapi.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24690,6 +24690,8 @@ components:
2469024690
- charge
2469124691
- charge_details
2469224692
- created_at
24693+
- error_message
24694+
- error_code
2469324695
properties:
2469424696
id:
2469524697
allOf:
@@ -24784,6 +24786,20 @@ components:
2478424786
description: Date and time when the message entry was created.
2478524787
examples:
2478624788
- '2024-05-06T12:20:00Z'
24789+
error_message:
24790+
anyOf:
24791+
- type: string
24792+
- type: 'null'
24793+
description: Description of the error when the message failed. Null when the message did not fail. LaML messages use the codes documented at https://signalwire.com/docs/compatibility-api/rest/error-codes.
24794+
examples:
24795+
- From number is not a SMS-capable phone number.
24796+
error_code:
24797+
anyOf:
24798+
- type: string
24799+
- type: 'null'
24800+
description: Error code identifying why the message failed. Null when the message did not fail. Some Relay messages may have an `error_message` without an `error_code` — the `error_code` is a newer pattern that is not used in all Relay areas.
24801+
examples:
24802+
- '21601'
2478724803
unevaluatedProperties:
2478824804
not: {}
2478924805
description: Response model for message log retrieve endpoint
@@ -24929,6 +24945,8 @@ components:
2492924945
- charge
2493024946
- charge_details
2493124947
- created_at
24948+
- error_message
24949+
- error_code
2493224950
properties:
2493324951
id:
2493424952
allOf:
@@ -25023,6 +25041,20 @@ components:
2502325041
description: Date and time when the message entry was created.
2502425042
examples:
2502525043
- '2024-05-06T12:20:00Z'
25044+
error_message:
25045+
anyOf:
25046+
- type: string
25047+
- type: 'null'
25048+
description: Description of the error when the message failed. Null when the message did not fail. LaML messages use the codes documented at https://signalwire.com/docs/compatibility-api/rest/error-codes.
25049+
examples:
25050+
- From number is not a SMS-capable phone number.
25051+
error_code:
25052+
anyOf:
25053+
- type: string
25054+
- type: 'null'
25055+
description: Error code identifying why the message failed. Null when the message did not fail. Some Relay messages may have an `error_message` without an `error_code` — the `error_code` is a newer pattern that is not used in all Relay areas.
25056+
examples:
25057+
- '21601'
2502625058
unevaluatedProperties:
2502725059
not: {}
2502825060
description: Message log entry with all activity details

specs/signalwire-rest/message-api/logs/models/core.tsp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,12 @@ model MessageLog {
8888
@doc("Date and time when the message entry was created.")
8989
@example(UTC_TIME_EXAMPLE)
9090
created_at: utcDateTime;
91+
92+
@doc("Description of the error when the message failed. Null when the message did not fail. LaML messages use the codes documented at https://signalwire.com/docs/compatibility-api/rest/error-codes.")
93+
@example("From number is not a SMS-capable phone number.")
94+
error_message: string | null;
95+
96+
@doc("Error code identifying why the message failed. Null when the message did not fail. Some Relay messages may have an `error_message` without an `error_code` — the `error_code` is a newer pattern that is not used in all Relay areas.")
97+
@example("21601")
98+
error_code: string | null;
9199
}

0 commit comments

Comments
 (0)