Skip to content

Commit 5a5e77d

Browse files
committed
Add detail to error if webchat url doesn't exist
This will allow us to pinpoint which GOV.UK pages are trying to open a webchat url, without having any urls defined in [webchat.yaml] [webchat.yaml]: https://github.com/alphagov/government-frontend/blob/5974c4ec2c7e7a4eedcfda8f48370cce79c8efa0/lib/webchat.yaml
1 parent 82e1917 commit 5a5e77d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/assets/javascripts/webchat/library.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
function init () {
2323
if (!availabilityUrl || !openUrl) {
24-
throw Error.new('urls for webchat not defined')
24+
throw Error.new('urls for webchat not defined', window.location.href)
2525
}
2626

2727
if (openButton) {

0 commit comments

Comments
 (0)