question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hide stack trace in admin?

See original GitHub issue

How to prevent errors from showing in admin? I don’t want my users seeing the internal stack trace when something goes wrong.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
matthewhegartycommented, Oct 26, 2021

if there is any way to at least manipulate the trace error before the user can see it.

Yes this is possible and it allows the trace to be formatted or suppressed. You need to override the default Error class and then set this to be returned in your resource. For example:

class SimpleError(results.Error):
    def __init__(self, error, traceback=None, row=None):
        super().__init__(error, traceback=traceback, row=row)
        self.traceback = "redacted"

class BookResource(ModelResource):
    @classmethod
    def get_error_result_class(self):
        """
        Returns a class which has custom formatting of the error.
        """
        return SimpleError

    class Meta:
        model = Book
0reactions
matthewhegartycommented, Nov 20, 2021

This post shows the steps you can take to hide or modify the stack trace.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hide stack trace thrown by Tomcat while deploying ...
Hide the stack trace thrown by Tomcat (Application Server) when something goes wrong or there is an error in some configuration file while...
Read more >
Hide / Remove Stack Trace information - Microsoft Q&A
1 Answer ... You can try to configure <requestFiltering> to DENY the verb TRACE. ... More information you can refer to this link:...
Read more >
Disabling instrumented stack traces in WebLogic - IBM
Procedure · From the WebLogic System Administration Console, select each server on which Commerce Call Center is deployed. · Select Logging. · Uncheck...
Read more >
Accessing Stack Trace Errors
Steps to Enable/Disable ShowStackTraces · Navigate to Admin Explorer>Security>Application Security>Security Groups> Prototype Super> Company Security> Company ...
Read more >
KB20567: Is it possible to remove the StackTrace Information ...
To disable the exception from being embedded in the HTML source code, disable the following parameters from the MicroStrategy Web Administrator ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found