-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception is too much verbose #68
Comments
a related (although somehow independent) problem is that the above manages to utterly confuse WMCore's DBSReader wrapper producing a really awful ouput. @amaltaro
|
@belforte , here you hit several issues which bundle into single output:
|
One specific suggestion may be useful (but may not be practical) is to avoid using WMCore DBS code and vice versa (using WMCore code within DBSClient) where it is not appropriate. At the end when to query DBS we only need to make HTTP calls, that's it, but it does not need WMCore internals (including exception handling, logging, etc.) And, as you can see there are so many wrappers like |
thanks @vkuznet . I agree that when something goes wrong details are needed. I will figure out something |
And, since we talk about wrappers. DBSClient is nothing else as yet another wrapper around DBS REST APIs. If you want to skip entire pipeline you may consider talk directly to DBS end-points. For instance DBS API call |
well. I would not make direct calls to REST anyhow but would need some common code to wrap them to deal with common exceptions, config, and some peristent object in memory for connection reclycling etc.. so I am happy to use DBSClient which already takes care of some stuff I not comfortable with and returns well documented JSON ! It is not urgent, but sooner or later I will get rid of the wmcore wrapping |
I am using py3-dbs3-client/4.0.7 on python 3.8
I find that exception message from DBS error is way too much verbose to be usable/useful in logs.
Can something be done ?
Here's a quick example where I try to access a non-existing API [1].
Applications using DBS Client do not care to know the internal traceback (note in particular the
During handling of the above exception, another exception occurred:
In this case these two lineswould have been plenty.
[1]
The text was updated successfully, but these errors were encountered: