title: How to convert global enum values to string in Godot?
body: <p>The "GlobalScope" class defines many fundamental enums like the <a href="https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#enum-globalscope-error" rel="noreferrer"><code>Error</code></a> enum.</p>
  
  <p>I'm trying to produce meaningful logs when an error occurs. However printing a value of type <code>Error</code> only prints the integer, which is not very helpful.</p>
  
  <p>The Godot documentation on <a href="https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_basics.html#enums" rel="noreferrer">enums</a> indicates that looking up the value should work in a dictionary like fashion. However, trying to access <code>Error[error_value]</code> errors with:</p>
  
  <pre><code>The identifier "Error" isn't declared in the current scope.
  </code></pre>
  
  <p>How can I convert such enum values to string?</p>