files/en-us/web/api/webglrenderingcontext/geterror/index.md
{{APIRef("WebGL")}}{{AvailableInWorkers}}
The WebGLRenderingContext.getError() method of the WebGL API returns error information.
getError()
None.
gl.getError(); // gl.NO_ERROR (0)
gl.enable(gl.FOOBAR);
gl.getError(); // gl.INVALID_ENUM;
{{Specifications}}
{{Compat}}