summaryrefslogtreecommitdiffstats
path: root/examples/transmission
diff options
context:
space:
mode:
Diffstat (limited to 'examples/transmission')
-rw-r--r--examples/transmission/delete_transmission.php4
-rw-r--r--examples/transmission/get_all_transmissions.php4
-rw-r--r--examples/transmission/get_transmission.php4
-rw-r--r--examples/transmission/rfc822.php4
-rw-r--r--examples/transmission/send_transmission_all_fields.php4
-rw-r--r--examples/transmission/simple_send.php4
-rw-r--r--examples/transmission/stored_recipients_inline_content.php4
-rw-r--r--examples/transmission/stored_template_send.php4
8 files changed, 24 insertions, 8 deletions
diff --git a/examples/transmission/delete_transmission.php b/examples/transmission/delete_transmission.php
index de116eb..9459066 100644
--- a/examples/transmission/delete_transmission.php
+++ b/examples/transmission/delete_transmission.php
@@ -17,6 +17,8 @@ try {
$results = $sparky->transmission->delete('transmission-id');
echo 'Transmission deleted!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/get_all_transmissions.php b/examples/transmission/get_all_transmissions.php
index d4d92c0..a465056 100644
--- a/examples/transmission/get_all_transmissions.php
+++ b/examples/transmission/get_all_transmissions.php
@@ -17,6 +17,8 @@ try {
$results = $sparky->transmission->all();
echo 'Congrats! You got a list of all your transmissions from SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/get_transmission.php b/examples/transmission/get_transmission.php
index 974c064..879e9c3 100644
--- a/examples/transmission/get_transmission.php
+++ b/examples/transmission/get_transmission.php
@@ -17,6 +17,8 @@ try {
$results = $sparky->transmission->find('Your Transmission ID');
echo 'Congrats! You retrieved your transmission from SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/rfc822.php b/examples/transmission/rfc822.php
index c27fafb..5ec5aef 100644
--- a/examples/transmission/rfc822.php
+++ b/examples/transmission/rfc822.php
@@ -26,6 +26,8 @@ try {
]);
echo 'Congrats! You sent an email using SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/send_transmission_all_fields.php b/examples/transmission/send_transmission_all_fields.php
index 51b6a89..9db99d2 100644
--- a/examples/transmission/send_transmission_all_fields.php
+++ b/examples/transmission/send_transmission_all_fields.php
@@ -61,6 +61,8 @@ try{
echo 'Congrats! You sent an email using SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/simple_send.php b/examples/transmission/simple_send.php
index 08bef9a..5d2d6e3 100644
--- a/examples/transmission/simple_send.php
+++ b/examples/transmission/simple_send.php
@@ -32,6 +32,8 @@ try {
]);
echo 'Congrats! You sent an email using SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/stored_recipients_inline_content.php b/examples/transmission/stored_recipients_inline_content.php
index b31167c..8b16456 100644
--- a/examples/transmission/stored_recipients_inline_content.php
+++ b/examples/transmission/stored_recipients_inline_content.php
@@ -29,6 +29,8 @@ try {
echo 'Congrats! You sent an email using SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>
diff --git a/examples/transmission/stored_template_send.php b/examples/transmission/stored_template_send.php
index de0c01c..4d4adfe 100644
--- a/examples/transmission/stored_template_send.php
+++ b/examples/transmission/stored_template_send.php
@@ -30,6 +30,8 @@ try {
]);
echo 'Congrats! You sent an email using SparkPost!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getAPIMessage() . "\n";
+ echo $exception->getAPICode() . "\n";
+ echo $exception->getAPIDescription() . "\n";
}
?>