diff --git a/addon/www/rest.cgi b/addon/www/rest.cgi index 1f02bd5..4f8cdd7 100644 --- a/addon/www/rest.cgi +++ b/addon/www/rest.cgi @@ -234,7 +234,7 @@ variable content_type "application/json" if [catch {process} result] { set status 500 - if { $errorCode != "NONE" } { + if { [regexp {^\d+$} $errorCode ] } { set status $errorCode } puts "Content-Type: ${content_type}"