Coder Social home page Coder Social logo

Comments (8)

lizhihongTest avatar lizhihongTest commented on June 16, 2024

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

cyfs_stack.0.log

from cyfs.

lurenpluto avatar lurenpluto commented on June 16, 2024

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.

lizhihongTest avatar lizhihongTest commented on June 16, 2024

@weiqiushi If DynamicTokenHandler.call() return cyfs.Err() has the some issuse.

from cyfs.

weiqiushi avatar weiqiushi commented on June 16, 2024

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.

lurenpluto avatar lurenpluto commented on June 16, 2024

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.

lurenpluto avatar lurenpluto commented on June 16, 2024

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

// An error occurred while processing the request
pub const WS_CMD_PROCESS_ERROR: u16 = u16::MAX;

from cyfs.

lizhihongTest avatar lizhihongTest commented on June 16, 2024

@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.

lizhihongTest avatar lizhihongTest commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.