@@ -, +, @@ from unapi for the calls in the next steps. Apply the patch now. parameter. Check if you have a 400 status response. (In Firefox, look at Network tab of Developer Tools.) Note: Have to admit (reluctantly) that MS Edge shows the status code in the browser rightaway in contrast with Firefox. The wrong id parameter should trigger a 404 response. where notexist is a biblionumber that not exists. This should trigger again a 404 response. where exist should be a good biblionumber. The wrong format should trigger a 406 response. Create invalid xml in the file for marcxml (identity.xsl in intranet xslt folder). Call unapi with format=marcxml&id=koha:biblionumber:[exist]. You should get a 500 response and have warnings in your logfile. --- opac/unapi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/opac/unapi +++ a/opac/unapi @@ -129,7 +129,7 @@ if (not defined $format) { my $biblionumber = $1; my $content; - eval { + my $marcxml = GetXmlBiblio($biblionumber); unless (defined $marcxml) { # no bib, so 404 @@ -147,9 +147,9 @@ if (not defined $format) { xml => $marcxml, file => $xslt_file, }); - }; - if ($@) { - print $cgi->header( -status => '500 internal error ' . $@ ); + + if( !defined $content || $xslt_engine->err ) { + print $cgi->header( -status => '500 internal error' ); exit 0; } --