D2 encountered an API error: the link to the playground is reported
Here is the link with the error:
https://play.d2lang.com/?script=NMqxCsIwFIXhPU9xwDlQdMvm6ObgC1yTYxtoc-EmLYjk3YWI43fOf4jVgI8D0tlHLa88_wis8ta9eZY5FwY0aTL2Ex4LIU89iCh7ZYXger-BZmr_hLblIivawo2ImjieQZ9TwGWaHNBdd98AAAD__w%3D%3D&layout=tala&
Here is the code that cause the error:
vars: {
d2-config: {
layout-engine: tata
# The above causes a API error
# Terminal theme code
theme-id: 300
}
}
It seems that the offending line of the code is
layout-engine: tata
If I commented out this line, then there is no more API error.
I faced a similar API error issue on playground.
Toggling sketch mode results in an api error
Below is the diagram link on playground
https://play.d2lang.com/?script=bI7BTsMwEETv-xWj5AIIV4JWAfbAv7j1ulnJtSXXEXVR_h0lBKRAb7sz70njNMuhaIqMrMe-0AXmHZXRKz4JOJcahOcT8CkWxinFNL826skWcYySByFgpJHq5F_5v3yTvmxmZuM1BEbT-p197p4aqqu8T1Gqkw-6rvGgUWw2x2ydSix3re_e3PbwiHbrX19sd9_Qw2LsU3aSzUQOZ8aOfhuXhn0Q8w0s4366P5u_AgAA__8%3D&layout=dagre&sketch=1&theme=1&
Console Error:
host-network-events.js:1 GET https://api.d2lang.com/render/svg?script=bI7BTsMwEETv-xWj5AIIV4JWAfbAv7j1ulnJtSXXEXVR_h0lBKRAb7sz70njNMuhaIqMrMe-0AXmHZXRKz4JOJcahOcT8CkWxinFNL826skWcYySByFgpJHq5F_5v3yTvmxmZuM1BEbT-p197p4aqqu8T1Gqkw-6rvGgUWw2x2ydSix3re_e3PbwiHbrX19sd9_Qw2LsU3aSzUQOZ8aOfhuXhn0Q8w0s4366P5u_AgAA__8=&layout=dagre&theme=1&sketch=1 500 (Internal Server Error)
If I comment out the following, then no API error:
direction: right
x -> y: hi {
style: {
font: mono
animated: true
}
}
y -> z: {
style: {
animated: true
}
}
-x.style.fill: "#f4a261"
-y.style.fill: honeydew
-z.style.fill: "linear-gradient(#f69d3c, #3f87a6)"
-*.style.border-radius: 4
-*.style.double-border: true
-*.style.animated: true