File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,10 @@ pub async fn public_page(
309
309
..config. PUBLIC_DATASET . extra_params. unwrap_or_default( )
310
310
}
311
311
} )
312
- . unwrap ( ) ;
312
+ . map_err ( |e| {
313
+ log:: error!( "Error rendering template: {:?}" , e) ;
314
+ ServiceError :: InternalServerError ( "Error rendering template" . to_string ( ) )
315
+ } ) ?;
313
316
314
317
Ok ( HttpResponse :: Ok ( ) . body ( response_body) )
315
318
} else {
Original file line number Diff line number Diff line change 280
280
< main >
281
281
< div class ="basic ">
282
282
< div id ="root " class ="min-h-[36px] "> </ div >
283
- {% if params.singleProductOptions.productName %} {% include "product.html" %} {%
284
- endif %} {% if tabs|length > 0 %} {% include "tabs.html" %} {% else %}
285
- {% include "search-component-code.html" %} {% endif %}
283
+ {% if params.singleProductOptions and params.singleProductOptions.productName %} {% include
284
+ "product.html" %} {% endif %} {% if tabs|length > 0 %} {% include
285
+ "tabs.html" %} {% else %} {% include "search-component-code.html" %} {%
286
+ endif %}
286
287
</ div >
287
288
</ main >
288
289
{% if logged_in %}
You can’t perform that action at this time.
0 commit comments