adobe / alloy-samples

Apache License 2.0
8 stars 13 forks source link

Better error handling #4

Closed jasonwaters closed 1 year ago

jasonwaters commented 1 year ago

Description

The samples in this repo were built so that customers and consultants can easily try out the samples using their own datastreams and personalization offers. They can simply modify the properties in the .env file to do so.

.env file

CLIENT_CODE="unifiedjslab"
ORGANIZATION_ID="97D1F3F459CE0AD80A495CBE@AdobeOrg"
EDGE_CONFIG_ID_WITH_ANALYTICS="0a106b4d-1937-4196-a64d-4a324e972459"
EDGE_CONFIG_ID_WITHOUT_ANALYTICS="73690cda-9d47-4d55-b669-2d027dc01d19"
TIMEOUT=10000
SERVER_DOMAIN="ujsl.tt.omtrdc.net"
PROPERTY_ID="abf13992-2ba6-fcc7-5d83-885501ed6883"
FPID="xyz123"
demoDecisionScopeName="sample-json-offer"
PORT=80

Recently one of our internal consultants contacted me about a problem he had after customizing the environment to his own. It turned out that the datastream ID was invalid. But there was no easy way for him to discover the problem.

This PR updates each sample so that if there are errors, they are caught and displayed in the UI. That way folks can tinker with the sample and mistakes will be more obvious.

Screens

Fully functioning sample

screenshot-2022-10-24-135906@2x

Sample with misconfigured datastream

screenshot-2022-10-24-135944@2x

Types of changes