Skip to content

Commit

Permalink
Add detail to error if webchat url doesn't exist
Browse files Browse the repository at this point in the history
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
  • Loading branch information
leenagupte committed Mar 10, 2022
1 parent 82e1917 commit 5a5e77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/webchat/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

function init () {
if (!availabilityUrl || !openUrl) {
throw Error.new('urls for webchat not defined')
throw Error.new('urls for webchat not defined', window.location.href)
}

if (openButton) {
Expand Down

0 comments on commit 5a5e77d

Please sign in to comment.