Comments (8)
There are details of this operation rep_path and object
[debug],[2023-04-28 20:14:27.186],<>,put object to non service success: 9tGpLNnLEVgDb664QusWPC1y5P3Hge7CQ5u3ajdFFtDB, cyfs_node.js:81230
[info],[2023-04-28 20:14:27.855],<>,will handle dynamic acl/qa_test_token/share-9tGpLNnLEVgDb664QusWPC1y5P3Hge7CQ5u3ajdFFtDB: querytoken=sk-RnSx7E7HbBEDS9zsiG19ePc02500YS&response_error=404, dynamic_token_handler.ts:33
[info],[2023-04-28 20:14:27.856],<>,Dynamic Token will check key=token value = sk-RnSx7E7HbBEDS9zsiG19ePc02500YS, dynamic_token_handler.ts:40
[info],[2023-04-28 20:14:27.857],<>,DynamicTokenHandler check token success,will return access accept, dynamic_token_handler.ts:42
[info],[2023-04-28 20:14:27.857],<>,Dynamic Token will check key=response_error value = 404, dynamic_token_handler.ts:40
[info],[2023-04-28 20:14:27.858],<>,DynamicTokenHandler will response error 404, dynamic_token_handler.ts:52
from cyfs.
From the processing logs of the acl handler, the error return inside this ts-sdk is not returned to the internal cyfs-stack, probably because there is a problem with the js layer, which causes the request to be blocked and needs to wait for a timeout before it returns
Details
[2023-04-28 20:14:26.293909 +08:00] INFO [ThreadId(4)] [component\cyfs-stack\src\non_api\handler\handler.rs:71] non acl handler resp: chain=acl, category=acl, req=/qa_test_token/share-9tGpLNniyP36axfCsdgDe9ogScdL4mcqXyb31gwsLh4L, action: Response, response: action: Accept
[2023-04-28 20:14:27.139859 +08:00] INFO [ThreadId(10)] [component\cyfs-stack\src\non_api\handler\handler.rs:71] non acl handler resp: chain=acl, category=acl, req=/qa_test_token/share-9tGpLNnVA1mjL3QVJvivQ7XUQt1RJ9zUdCX2xWGKv3fd, action: Response, response: action: Reject
from cyfs.
@weiqiushi If DynamicTokenHandler.call() return cyfs.Err() has the some issuse.
from cyfs.
The processing logic here is:
When the call() of Routine returns cyfs.Err(), it means that an error occurred in the processing function itself, and this error will not be returned to the calling end.
Only when call() returns cyfs.Ok(resp), the processing result, as indicated by resp, will be returned to the calling end.
The above processing logic is common to all handlers
back to this issue, you MUST return Ok({action: cyfs.AclAction.Reject}) when you want caller recv a acl reject error.
from cyfs.
The processing logic here is:
When the call() of Routine returns cyfs.Err(), it means that an error occurred in the processing function itself, and this error will not be returned to the calling end. Only when call() returns cyfs.Ok(resp), the processing result, as indicated by resp, will be returned to the calling end.
The above processing logic is common to all handlers
back to this issue, you MUST return Ok({action: cyfs.AclAction.Reject}) when you want caller recv a acl reject error.
The current user layer registered Handler, in the case of return Err (), is equivalent to the SDK internal processing error, this case does not do a timely response to the caller, so need to wait for a timeout before returning, this is not very friendly, need to improve
Consider in the ws-based event system, the unified introduction of such errors error packet to deal with, that the event response side of the error, so that the upper layer can receive timely feedback and continue the subsequent process
from cyfs.
This logical improvement: In the case that the handler callback returns Err(e), the processing is considered to have failed, which is equivalent to the failure of the entire processing logic of the callback, using the default action of the handler's registration as the processing result
To handle this case, a WS_CMD_PROCESS_ERROR
cmd is added to the handler's ws protocol to return an error
CYFS/src/component/cyfs-lib/src/base/protocol.rs
Lines 33 to 34 in 3888288
from cyfs.
@lurenpluto cyfs ts-sdk reported an error when codec.encode_string
[info],[2023-05-05 13:23:46.764],<>,DynamicTokenHandler check token success,will return access accept, dynamic_token_handler.ts:42
[info],[2023-05-05 13:23:46.765],<>,Dynamic Token will check key=return_error value = 502, dynamic_token_handler.ts:40
[info],[2023-05-05 13:23:46.766],<>,DynamicTokenHandler will return error 502, dynamic_token_handler.ts:58
[error],[2023-05-05 13:23:46.768],<>,ws process packet error: sid=838, err= TypeError: codec.encode_string is not a function, cyfs_node.js:88506
[error],[2023-05-05 13:28:46.446],<>,fetch error: undefined, fetch failed, cyfs_node.js:76984
from cyfs.
This issuse has been fixed,it will return error success.
get_object_by_path err = {"m_code":{"m_code":30,"m_value":30},"m_msg":"non acl rejected default or by handler! chain=acl, category=acl, req=/qa_test_token/share-9tGpLNnWdacZ1tSsVh4y34c8vZFqibsbge2p5bUK3bdx"}
from cyfs.
Related Issues (20)
- After App-manager restarted the DEC APP installation process, the DEC APP was not started HOT 3
- Linux app-manager restore installation failed when app-manager breaks down when DEC APP is running "npm i" HOT 4
- Optimize service publishing process HOT 1
- How to config handler`s filter? HOT 3
- The `ping` with `sn` is stopped? HOT 2
- Systemctl status of ood-daemon.service is error HOT 8
- Create restore task not save archive file to disk HOT 1
- Connection problem between runtime and gateway HOT 3
- Stable sort for HashSet HOT 4
- Only web dec_app install failed HOT 1
- Customizing system info HOT 3
- Backup service supports conditional filtering of key data HOT 2
- Release schedule for 84
- Test schedule for 84 Release
- Problems with ood-daemon restore backup data HOT 3
- Query task group state failed in rust. HOT 3
- Method to get an object from MetaChain by body-hash to get a specific version. HOT 1
- Unsound `transmute` in safe method
- `ChunkId::new` panic with misaligned pointer dereference HOT 3
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 cyfs.