CEK validation error is not being passed to client

Hi guys,

I’m trying to interact with smart contract using nami wallet.
I have this simple validator

{-# INLINABLE mkbreedValidator #-}
mkValidator :: SomeConfig → SomeDatum → SomeAction → ScriptContext → Bool
mkValidator cfg dat r ctx = case r of
Claim → traceIfFalse “No rights” (txSignedBy (scriptContextTxInfo ctx) (owner dat)) &&
traceIfFalse “Fee not paid” (checkFee (serviceFee dat)) &&
traceIfFalse “wrong policies” validatePolicies --basically checks if NFT1 has same policy as NFT2 that were locked in the SC address
Cancel → traceIfFalse “No rights” (txSignedBy (scriptContextTxInfo ctx) (owner breedDat))

When I’m testing it using cardano-cli I’m getting CEK exception like “wrong policies” when into smart contract I lock two NFTs that cannot interact with itself.

When I do the same from website that has NAMI integration I’m not getting CEK exception, instead I’m getting something like this:

““transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (UtxosFailure (ValidationTagMismatch (IsValid True) (FailedUnexpectedly [PlutusFailure “\nThe 3 arg plutus script (PlutusScript PlutusV1 ScriptHash \“55f3d7644b0337e8dd9a29b9fb50c5c2d1bd97de49a654898ecb07cd\”) fails.\nCekError An error has occurred: User error:\nThe provided Plutus code called ‘error’.\nThe data is: Constr 0 [B \\\”_\\\\SYN\\\\DC4\\\\153C\\\\217\\\\132\\\\182\\\\228\\\\158\\\\169\\\\149\\\\193R\\\\230z3\\\\a\\\\DC1\\\\SO\\\\219q\\\\190\\\\ACK\\\\131\\\\221\\\\167^\\\”,I 1645971519000,B \\\”\\\\230\\\\ESC\\\\252\\\\DLEc8\\\\237J\\\\235\\\\169\\\\&062O\\\\190\\\\168\\\\NAK\\\\SI\\\\217u\\\\SI\\\\207\\\\252\\\\161\\\\205\\\\159\\\\SUB\\\\EM\\\",B \\\“DinoSavior02852\\\”,B \\\"\\\\230\\\\ESC\\\\252\\\\DLEc8\\\\237J\\\\235\\\\169\\\\&062O\\\\190\\\\168\\\\NAK\\\\SI\\\\217u\\\\SI\\\\207\\\\252\\\\161\\\\205\\\\159\\\\SUB\\\\EM\\\",B \\\“DinoSavior01301\\\”,I 10000000,I 1000]\nThe redeemer is: Constr 0 \nThe context is:\nPurpose: Spending (TxOutRef {txOutRefId = 8ebe3faacf16eadc2fe57c249659577a83e599d008447717ba57d454adb45efa, txOutRefIdx = 0})\nTxInfo:\n TxId: 52b1096e04b760574eb090fd7f605041d9abc98bf4089ff7fcf61a61e2429c3f\n Inputs: [ 18a116d5723791d8d5457d4e0ff686c91443ef6d8223dd2317f0f4e2a5a67b45!2 → - Value (Map [(,Map [(\"\",168041342)])]) addressed to\n PubKeyCredential: 5f16149943d984b6e49ea995c152e67a3307110edb71be0683dda75e (StakingHash PubKeyCredential: 309275ebc497184c163de20271e1af63d6e7b1e03f4b6cea0af3fd4a)\n , 8ebe3faacf16eadc2fe57c249659577a83e599d008447717ba57d454adb45efa!0 → - Value (Map [(,Map [(\"\",13000000)]),(e61bfc106338ed4aeba93036324fbea8150fd9750fcffca1cd9f1a19,Map [(\“DinoSavior01301\”,1),(\“DinoSavior02852\”,1)])]) addressed to\n ScriptCredential: 55f3d7644b0337e8dd9a29b9fb50c5c2d1bd97de49a654898ecb07cd (no staking credential) ]\n Outputs: [ - Value (Map [(,Map [(\"\",3000000)]),(e61bfc106338ed4aeba93036324fbea8150fd9750fcffca1cd9f1a19,Map [(\“DinoSavior01301\”,1),(\“DinoSavior02852\”,1)])]) addressed to\n PubKeyCredential: 5f16149943d984b6e49ea995c152e67a3307110edb71be0683dda75e (StakingHash PubKeyCredential: 309275ebc497184c163de20271e1af63d6e7b1e03f4b6cea0af3fd4a)\n , - Value (Map [(,Map [(\"\",10000000)])]) addressed to\n PubKeyCredential: e2a206cf1f33c8bb90722b6fd92f747911485954f0562faae0b16bc0 (StakingHash PubKeyCredential: d55b8648692398368392f24ad16d56235d1b514ed616b09cdb7281b2)\n , - Value (Map [(,Map [(\"\",167032429)])]) addressed to\n PubKeyCredential: 5f16149943d984b6e49ea995c152e67a3307110edb71be0683dda75e (StakingHash PubKeyCredential: 309275ebc497184c163de20271e1af63d6e7b1e03f4b6cea0af3fd4a) ]\n Fee: Value (Map [(,Map [(\"\",1008913)])])\n Value minted: Value (Map )\n DCerts: \n Wdrl: \n Valid range: [ POSIXTime 1645971381000 , +\8734)\n Signatories: [5f16149943d984b6e49ea995c152e67a3307110edb71be0683dda75e]\n Datums: [ ( e17df52a2abe79748b58b03ba88f2331d09a897c71f9433b6eb02a04088eb8c0\n , <\"_\\SYN\\DC4\\153C\\217\\132\\182\\228\\158\\169\\149\\193R\\230z3\\a\\DC1\\SO\\219q\\190\\ACK\\131\\221\\167^\",\n 1645971519000,\n \"\\230\\ESC\\252\\DLEc8\\237J\\235\\169\\&062O\\190\\168\\NAK\\SI\\217u\\SI\\207\\252\\161\\205\\159\\SUB\\EM\",\n \“DinoSavior02852\”,\n \"\\230\\ESC\\252\\DLEc8\\237J\\235\\169\\&062O\\190\\168\\NAK\\SI\\217u\\SI\\207\\252\\161\\205\\159\\SUB\\EM\",\n \“DinoSavior01301\”,\n 10000000,\n 1000> ) ]\n" “hZ8aAAMCWQABARoABgvHGQJtAAEaAAJJ8BkD6AABGgACSfAYIBoAJc6oGXH3BBl0TRhkGXRNGGQZdE0YZBl0TRhkGXRNGGQZdE0YZBhkGGQZdE0YZBoAAknwGCAaAAJJ8BggGgACSfAYIBoAAknwGQPoAAEaAAJJ8BggGgACSfAZA+gACBoAAkIgGgAGfiMYdgABARoAAknwGQPoAAgaAAJJ8BoAAbeYGPcBGgACSfAZJxABGgACFV4ZBS4BGQPoGgACSfAZA+gBGgACSfAYIBoAAknwGCAaAAJJ8BggAQEaAAJJ8AEaAAJJ8AQaAAGUrxj4ARoAAZSvGPgBGgACN3wZBVYBGgACveoZAfEBGgACSfAYIBoAAknwGCAaAAJJ8BggGgACSfAYIBoAAknwGCAaAAJJ8BggGgACQiAaAAZ+Ixh2AAEBGfBMGSvSAAEaAAJJ8BggGgACQiAaAAZ+Ixh2AA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IiIzIjMzMiIiMzMiIjMyIjMiMyIzIjMyIjMiMyIzMiIzIjMiMyIzIjIzIjIzIjIyMjIzMyIiMjMiMiIyMiJTNTBRACFTNTAxMwETUwGQASIAI1ME0AUiIiIiAIEDMTNXOJIEJTm8gcmlnaHRzAAMhUzUwMVM1MDEzARNTAZABIgAjUwTQBSIiIiIAgQMxM1c4kgEJTm8gcmlnaHRzAAMhUzUwMVM1MDE1NQFjAVMzIiMjIwA”

I know that validator works because when I try to interact with smart contract from the same page/code when using two NFTs that have valid policy id, I can claim them back.

Any idea who to ping?