-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
3.4.4
-
None
Steps to reproduce
- open corrupt imaging URL:
(Correct would be https://demoauthor.magnolia-cms.com/.imaging/mte/travel-demo-theme/1366/dam/tours/simon-mumenthaler-199501-unsplash/jcr:content/simon-mumenthaler-199501-unsplash.jpg)
Expected results
404 response
Actual results
500 response with stacktrace
Development notes
The error is probably caused by wrapping the ImagingException into a RuntimeException:
CachingImageStreamer.java:126
// We're (ab)using CacheLoader -- this is NOT the cache. We're merely using it to schedule concurrent image generation jobs. .build(new CacheLoader<ImageGenerationJob<P>, Property>() { @Override public Property load(ImageGenerationJob<P> job) throws Exception { try { return generateAndStore(job.getGenerator(), job.getParams()); } catch (IOException | ImagingException e) { // the LoadingCache will further wrap these in ExecutionExceptions, and we will, in turn, unwrap them ... throw new RuntimeException(e); } } });
It should probably be unpacked here again:
CachingImageStreamer.java:149
} catch (ExecutionException e) { // thrown if the LoadingCache's Function failed unwrapRuntimeException(e); }
However, a breakpoint here does not hit.
Acceptance criteria