enrich icon indicating copy to clipboard operation
enrich copied to clipboard

Avoid ArrayIndexOutOfBoundsException in PageEnrichments

Open istreeter opened this issue 2 years ago • 0 comments

I have seen an example of this exception:

ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.web.PageEnrichments$.parseCrossDomain(PageEnrichments.scala:62)
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.EnrichmentManager$.$anonfun$getCrossDomain$1(EnrichmentManager.scala:616)
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.EnrichmentManager$EStateT$.$anonfun$fromEither$1(EnrichmentManager.scala:150)
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.EnrichmentManager$EStateT$.$anonfun$fromEitherF$1(EnrichmentManager.scala:158)
    at scala.Function1.$anonfun$andThen$1(Function1.scala:57)
...
(20 additional frame(s) were not displayed)

The exception is coming from this line, presumably when the _sp query parameter is an empty string.

istreeter avatar Aug 09 '23 22:08 istreeter