log1st
log1st
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
Got it! Thanks.
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
I didn't see toJSON before, looks like it's new feature. I think that's enough for me. I'll make workaround with that structure. Thank you.
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
Some of my services may add errors during call stack between them.
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
That's what I'm doing now. But as I know ArkErrors contains context? How can I extract that context during serialization?
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
I'm usting superjson to serialize errors and deserialize after in responses to use features of traversal and etc.
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
What about deserializing?
15 replies
Aarktype
Created by log1st on 3/26/2025 in #questions
Issue with Default<> in Type as generic.
Awesome, @ArkDavid ! Thank you very much. Also i had a question about serializing ArkErrors before. Is it possible?
15 replies
Aarktype
Created by log1st on 2/13/2025 in #questions
ArkErrors serialization/deserialization
So, theoretically, I can use error.path and error.input for storing data during serialization. As long as the Traversal config is the same between the serializer and deserializer, I see that these fields, along with data, can be removed from the object. The only problem is that I’m not sure how to properly deserialize it back while keeping all the internal logic working as expected.
10 replies
Aarktype
Created by log1st on 2/13/2025 in #questions
ArkErrors serialization/deserialization
As i see there's ArkError:input field in each object and it depends on the rule that failed validation. eg. "string > 2" in case of failure contains
input = {
code: 'minLength',
description: 'at least length 2',
meta: {},
rule: 2
}
input = {
code: 'minLength',
description: 'at least length 2',
meta: {},
rule: 2
}
10 replies
Aarktype
Created by log1st on 2/13/2025 in #questions
ArkErrors serialization/deserialization
yup, that's not what i'm looking for. my goal is to serialize and deserialize whole ArkErrors object.
10 replies
Aarktype
Created by log1st on 2/13/2025 in #questions
ArkErrors serialization/deserialization
Or am I that blind? 🙂
10 replies
Aarktype
Created by log1st on 2/13/2025 in #questions
ArkErrors serialization/deserialization
It does serialize typing schema but what about ArkErrors?
10 replies