You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Branham, Jeremy (Experis)" <jb...@allstate.com> on 2019/02/21 15:45:41 UTC

Suppress stack trace in error response

When Solr throws an exception, like when a client sends a badly formed query string, is there a way to suppress the stack trace in the error response?



Jeremy Branham
jbrcm@allstate.com<ma...@allstate.com>
Allstate Insurance Company | UCV Technology Services | Information Services Group


Re: Re: Re: Suppress stack trace in error response

Posted by "Branham, Jeremy (Experis)" <jb...@allstate.com>.
BTW – Congratulations on joining the PMC!

 
Jeremy Branham
jbrcm@allstate.com

On 2/22/19, 9:46 AM, "Branham, Jeremy (Experis)" <jb...@allstate.com> wrote:

    Thanks Jason –
    That’s what I was thinking too. It would require some development.
    
     
    Jeremy Branham
    jbrcm@allstate.com
    
    On 2/22/19, 8:50 AM, "Jason Gerlowski" <ge...@gmail.com> wrote:
    
        Hi Jeremy,
        
        Unfortunately Solr doesn't offer anything like what you're looking
        for, at least that I know of.  There's no sort of global "quiet" or
        "suppressStack" option that you can pass on a request to _not_ get the
        stacktrace information back.  There might be individual APIs which
        offer something like this, but I've never run into them, so I doubt
        it.
        
        Best,
        
        Jason
        
        On Thu, Feb 21, 2019 at 10:53 PM Zheng Lin Edwin Yeo
        <ed...@gmail.com> wrote:
        >
        > Hi,
        >
        > There's too little information provided in your questions.
        > You can explain more on the issue or the exception that you are facing.
        >
        > Regards,
        > Edwin
        >
        > On Thu, 21 Feb 2019 at 23:45, Branham, Jeremy (Experis) <jb...@allstate.com>
        > wrote:
        >
        > > When Solr throws an exception, like when a client sends a badly formed
        > > query string, is there a way to suppress the stack trace in the error
        > > response?
        > >
        > >
        > >
        > > Jeremy Branham
        > > jbrcm@allstate.com<ma...@allstate.com>
        > > Allstate Insurance Company | UCV Technology Services | Information
        > > Services Group
        > >
        > >
        
    
    


Re: Re: Suppress stack trace in error response

Posted by "Branham, Jeremy (Experis)" <jb...@allstate.com>.
Thanks Jason –
That’s what I was thinking too. It would require some development.

 
Jeremy Branham
jbrcm@allstate.com

On 2/22/19, 8:50 AM, "Jason Gerlowski" <ge...@gmail.com> wrote:

    Hi Jeremy,
    
    Unfortunately Solr doesn't offer anything like what you're looking
    for, at least that I know of.  There's no sort of global "quiet" or
    "suppressStack" option that you can pass on a request to _not_ get the
    stacktrace information back.  There might be individual APIs which
    offer something like this, but I've never run into them, so I doubt
    it.
    
    Best,
    
    Jason
    
    On Thu, Feb 21, 2019 at 10:53 PM Zheng Lin Edwin Yeo
    <ed...@gmail.com> wrote:
    >
    > Hi,
    >
    > There's too little information provided in your questions.
    > You can explain more on the issue or the exception that you are facing.
    >
    > Regards,
    > Edwin
    >
    > On Thu, 21 Feb 2019 at 23:45, Branham, Jeremy (Experis) <jb...@allstate.com>
    > wrote:
    >
    > > When Solr throws an exception, like when a client sends a badly formed
    > > query string, is there a way to suppress the stack trace in the error
    > > response?
    > >
    > >
    > >
    > > Jeremy Branham
    > > jbrcm@allstate.com<ma...@allstate.com>
    > > Allstate Insurance Company | UCV Technology Services | Information
    > > Services Group
    > >
    > >
    


Re: Suppress stack trace in error response

Posted by Jason Gerlowski <ge...@gmail.com>.
Hi Jeremy,

Unfortunately Solr doesn't offer anything like what you're looking
for, at least that I know of.  There's no sort of global "quiet" or
"suppressStack" option that you can pass on a request to _not_ get the
stacktrace information back.  There might be individual APIs which
offer something like this, but I've never run into them, so I doubt
it.

Best,

Jason

On Thu, Feb 21, 2019 at 10:53 PM Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
>
> Hi,
>
> There's too little information provided in your questions.
> You can explain more on the issue or the exception that you are facing.
>
> Regards,
> Edwin
>
> On Thu, 21 Feb 2019 at 23:45, Branham, Jeremy (Experis) <jb...@allstate.com>
> wrote:
>
> > When Solr throws an exception, like when a client sends a badly formed
> > query string, is there a way to suppress the stack trace in the error
> > response?
> >
> >
> >
> > Jeremy Branham
> > jbrcm@allstate.com<ma...@allstate.com>
> > Allstate Insurance Company | UCV Technology Services | Information
> > Services Group
> >
> >

Re: Re: Suppress stack trace in error response

Posted by "Branham, Jeremy (Experis)" <jb...@allstate.com>.
Thanks Edwin – You’re right, I could explain that a bit more.
My security team has run a scan against the SOLR servers and identified a few things they want suppressed, one being the stack trace in an error message.

For example –
<response>
<lst name="responseHeader">
<int name="status">500</int>
<int name="QTime">1</int>
<lst name="params">
<str name="rows">`</str>
</lst>
</lst>
<lst name="error">
<str name="msg">For input string: "`"</str>
<str name="trace">
java.lang.NumberFormatException: For input string: "`" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at …


I’ve got a long-term solution involving middleware changes, but I’m not sure there is a quick fix for this.

 
Jeremy Branham
jbrcm@allstate.com

On 2/21/19, 9:53 PM, "Zheng Lin Edwin Yeo" <ed...@gmail.com> wrote:

    Hi,
    
    There's too little information provided in your questions.
    You can explain more on the issue or the exception that you are facing.
    
    Regards,
    Edwin
    
    On Thu, 21 Feb 2019 at 23:45, Branham, Jeremy (Experis) <jb...@allstate.com>
    wrote:
    
    > When Solr throws an exception, like when a client sends a badly formed
    > query string, is there a way to suppress the stack trace in the error
    > response?
    >
    >
    >
    > Jeremy Branham
    > jbrcm@allstate.com<ma...@allstate.com>
    > Allstate Insurance Company | UCV Technology Services | Information
    > Services Group
    >
    >
    


Re: Suppress stack trace in error response

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi,

There's too little information provided in your questions.
You can explain more on the issue or the exception that you are facing.

Regards,
Edwin

On Thu, 21 Feb 2019 at 23:45, Branham, Jeremy (Experis) <jb...@allstate.com>
wrote:

> When Solr throws an exception, like when a client sends a badly formed
> query string, is there a way to suppress the stack trace in the error
> response?
>
>
>
> Jeremy Branham
> jbrcm@allstate.com<ma...@allstate.com>
> Allstate Insurance Company | UCV Technology Services | Information
> Services Group
>
>