Comments (4)
Hello, Vladislav!
Unfortunately, I failed to reproduce your error with set_user_skill method.
If I pass wrong skill_id, I get
ValidationApiError(
status_code=400,
request_id='ac775943dff967d8df8f3a22a65f2c5b',
code='VALIDATION_ERROR',
message='Validation failed',
payload={'skill_id': {'code': 'ENTITY_DOES_NOT_EXIST', 'message': 'Entity does not exist'}}
)
If I pass wrong user_id, I get
ValidationApiError(
status_code=400,
request_id='9b9fed94164f7365aa4978c695afd169',
code='VALIDATION_ERROR',
message='Validation failed',
payload={'user_id': {'code': 'ENTITY_DOES_NOT_EXIST', 'message': 'Entity does not exist'}}
)
For me both errors had status codes 400, not 404 and the actual reason could be deduced from the payload
attribute of the error.
Could you please provide a minimal example to reproduce the problem?
from toloka-kit.
Oh, that's on me.
Yeah, I did got 400 too (did not notice specific status code and thought it would be 404, since the code says DOES_NOT_EXIST. As for the eloquence, I just did not notice that in a payload the first parts says which specific parameters are missing on a Toloka's backend.
TBH, the message is not really friendly from my point of view, but not sure that is an issue.
from toloka-kit.
I will double-check the error format and
- if backend guarantees that payload may only contain one error, we can raise more specific errors
- if not, we can think about more user-friendly exception message
from toloka-kit.
Exceptions are enhanced in #106
from toloka-kit.
Related Issues (20)
- [DOCS] HOT 1
- [BUG] type annotations for optional parameters
- [FEATURE] pipeline support on windows
- [BUG] Can't get pool which has specified 'experimental group' parameter in audience filter settings HOT 3
- [FEATURE] Add support of cattr 22.2.0 HOT 3
- [BUG] TypeError: __init__() got an unexpected keyword argument 'verified' HOT 1
- [BUG] Impossible to get a pool with filter that contains a subfilter with null value HOT 1
- [BUG] ValidationApiError in collab example for SANDBOX HOT 3
- Attrs dependency requirement conflicts with Airflow HOT 6
- Is it possible to delete task from pool? HOT 2
- "UnboundLocalError: local variable 'start_soon' referenced before assignment" in pipeline.py HOT 2
- PoolCompletedPercentage metric raises an error for closed pools HOT 1
- Improvement 6.streaming_pipelines example HOT 2
- Tasks creation progress bar HOT 2
- Hook for automatic stubs and documentation re-generation
- TypeError: __init__() got an unexpected keyword argument 'allowed_methods' in v 0.1.23 HOT 2
- KeyError while using toloka.client.TolokaClient.find_pools/get_pools HOT 3
- [Feature]: Add parameter 'infinite_overlap': True for control tasks HOT 1
- Make optional dependencies HOT 2
- [Question] Pool type HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toloka-kit.