diff --git a/src/API/v1/CreateRelease.php b/src/API/v1/CreateRelease.php index ec02c3a..fdc9f20 100644 --- a/src/API/v1/CreateRelease.php +++ b/src/API/v1/CreateRelease.php @@ -149,6 +149,8 @@ public function handle(\WP_REST_Request $request): \WP_REST_Response return new \WP_REST_Response($release->toArray(), 201); } catch (\Exception $e) { + edd_debug_log(sprintf('SL Releases - CreateRelease - API error: %s', $e->getMessage())); + return new \WP_REST_Response(['error' => $e->getMessage()], $e->getCode() ? : 500); } }