-
-
Notifications
You must be signed in to change notification settings - Fork 249
ERROR CODE ATTRIBUTE TYPE MISMATCH #2117
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
Comments
Hi @Trandx , import {Any} from "permify-node/grpc/generated/google/protobuf/any";
// Create a StringValue message
const stringValue = permify.grpc.base.StringValue.fromJSON({ data: "activated" });
// Create an Any message that wraps the StringValue
const message = Any.fromJSON({
typeUrl: 'type.googleapis.com/base.v1.StringValue',
value: permify.grpc.base.StringValue.encode(stringValue).finish()
}); Then use it like this when writing the data: client.data.write({
tenantId: "t1",
metadata: {
schemaVersion: schemaVersion
},
attributes: [
{
entity: {
type: "tenants",
id: "1"
},
attribute: "tenantStatus",
value: message
}
],
// ...
}); Let me know if this works for you! |
Thank you very much, it work well but, when i try to check permission, now i have this error: "/base.v1.Permission/Check INTERNAL: failed to evaluate expression: no such key: tenant" this is my data
|
@Trandx , Could you try with this:
then you need to change context call of your model like this:
|
i have the same error I've updated the context to:
|
Hi @Trandx ,
After making these changes to the model, I no longer get an error when I send the following request: {
"metadata": {
"schemaVersion": "",
"snapToken": "",
"depth": 20
},
"entity": {
"type": "tenants",
"id": "sch_54f8bbfa"
},
"permission": "manage",
"subject": {
"type": "accounts",
"id": "7382a18d-b652-41eb-ad0b-d06d8cd657cf",
"relation": ""
},
"context": {
"data": {
"account": {
"status": "actived"
},
"tenant": {
"status": "actived"
}
}
}
} Can you double-check to confirm everything looks good? |
okay, let's me check! |
After many verification and checks i have each time this response.
I've verified my data relation and my data checking |
Hi @Trandx , could you send me all the relationships and attributes you created? |
Hello!!
I Need help please.
I want to write data on this route
permifyClient.data.write
with sdk Permify-node by i've this error:ERROR [Event] /base.v1.Data/Write NOT_FOUND: ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH
ClientError: /base.v1.Data/Write NOT_FOUND: ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH
this my schema
this my data (note date certain fields is variables values)
The text was updated successfully, but these errors were encountered: