{
    "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen",
    "locale": "en",
    "title": "Understanding common error messages · DeLaParra Services",
    "description": "Reading a stack trace, recognising the most common error types in PHP, JavaScript, Python and Java, and providing your AI assistant with the correct information.",
    "alternates": {
        "en": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen",
        "nl": "https://delaparra-services.nl/nl/handleidingen/foutmeldingen-begrijpen"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.csv",
        "md": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.md",
        "json": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.json",
        "zip": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.zip",
        "pdf": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.csv",
            "encodingFormat": "text/csv",
            "name": "foutmeldingen-begrijpen.csv"
        },
        {
            "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.json",
            "encodingFormat": "application/json",
            "name": "foutmeldingen-begrijpen.json"
        },
        {
            "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.md",
            "encodingFormat": "text/markdown",
            "name": "foutmeldingen-begrijpen.md"
        },
        {
            "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.pdf",
            "encodingFormat": "application/pdf",
            "name": "foutmeldingen-begrijpen.pdf"
        },
        {
            "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.zip",
            "encodingFormat": "application/zip",
            "name": "foutmeldingen-begrijpen.zip"
        }
    ],
    "markdown": "# Understanding error messages\n\nAn error message feels like a brick wall, but it’s actually a signpost. It tells you **what** went wrong, **where\n\n## Step 1: read the first line\n\nThe first line contains the **type** of error and a brief explanation:\n\n```\nTypeError: Cannot read properties of undefined (reading 'naam')\n```\n\n- `TypeError` = the type of error\n- the rest = what exactly happened\n\n## Step 2: read the stack trace\n\nBelow the error message is a list of files and line numbers: the **stack trace**. This shows which functions called one another before the error occurred. The top line is where the error occurred. Look for the **first line that points to your own code** (not to `vendor/` or `node_modules/`). That’s usually where the problem lies.\n\n```\n#0 app/Http/Controllers/FactuurController.php(42): ...\n#1 vendor/laravel/framework/...\n```\n\n→ Look in `FactuurController.php`, line 42.\n\n## The most common mistakes\n\n| Error | Language | Usually means |\n|---|---|---|\n| `TypeError` | JS, Python, PHP | Incorrect value type, e.g. `null` where an object is expected |\n| `ReferenceError` | JS | Variable does not exist (typo, incorrect scope) |\n| `SyntaxError` | all | Code cannot be read: missing bracket, comma or quotation mark |\n| `NullPointerException` | Java | You are using something that is `null` |\n| `AttributeError` | Python | Object does not have that attribute or method |\n| `KeyError` | Python | Key does not exist in a dictionary |\n| `IndexOutOfBoundsException` | Java | Index outside the list |\n| `ValueError` | Python | Correct type, incorrect value (`int(\"abc\")`) |\n| `ZeroDivisionError` | Python | Division by zero |\n| `AssertionError` | Python, tests | A check in a test failed |\n| `StackOverflowError` | Java | A function calls itself endlessly |\n| `OutOfMemoryError` | Java | Programme is using too much memory |\n| `Segmentation fault` | C, native | The programme read memory that did not belong to it |\n| `TimeoutError` | all | Something took too long (database, external API) |\n| `ConnectionRefused` | all | Nothing is running on that address/port |\n| `PermissionDenied` | all | No permissions for a file or folder |\n| `Deadlock` | databases | Two processes are waiting for each other |\n| CORS error | browser | The server does not permit the request from your site |\n\n**Logical errors** do not trigger any errors: the code runs, but does the wrong thing. That’s where tests come in (see *Testing your app with Pest*).\n\n## Step 3: Reproduce the error\n\nCan you make the error happen every time? If so, please write down:\n\n1. what you did (steps),\n2. what you expected,\n3. what happened (the full error message).\n\nIf you can’t reproduce the issue, it’s often down to timing (see the **concurrency-pitfalls** skill) or differences between your laptop and the server.\n\n## Step 4: Give your AI assistant the full context\n\nGood:\n\n> When I save an invoice, I get this error (full stack trace below). It only happens if the customer has no address. Please investigate the cause before making any changes.\n\nBad:\n\n> It’s not working – sort it out.\n\nWith the **systematic-debugging** skill, your assistant will first identify the cause, rather than guessing and simply dismissing the error message.\n\n## Where can you find mistakes?\n\n- **Laravel** `storage/logs/laravel.log`\n- **Browser:** F12 → Console\n- **Node:** the terminal where your app is running\n- **Production server:** a tool such as Sentry sends you a notification containing the stack trace (see *Logging and monitoring for your app*)\n\n## Need help?\n\nDo the same mistakes keep cropping up? With **AI code review**, I’ll identify the cause and teach your agent how to prevent it in future.\n\n## Skills\n\n- [Systematic Debugging] (/nl/skills/systematic-debugging)\n- [Debugging Strategies] (/nl/skills/debugging-strategies)\n- [Error Handling Patterns] (/nl/skills/error-handling-patterns)\n- [Bug Reproduction Brief] (/nl/skills/bug-reproduction-brief)\n- [Troubleshooting Backend Issues] (/nl/skills/troubleshooting-backend)\n- [Sentry PHP SDK] (/nl/skills/sentry-php-sdk)\n\n## Related services\n\n- [Beoordeling van AI-code] (/nl/services#service-05)\n- [Maatwerk software en webapplicaties] (/nl/services#service-03)\n\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "TechArticle",
                "@id": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen#article",
                "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen",
                "headline": "Understanding common error messages",
                "description": "Reading a stack trace, recognising the most common error types in PHP, JavaScript, Python and Java, and providing your AI assistant with the correct information.",
                "inLanguage": "en",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen#dataset",
                "name": "Understanding common error messages",
                "description": "Reading a stack trace, recognising the most common error types in PHP, JavaScript, Python and Java, and providing your AI assistant with the correct information.",
                "url": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen",
                "identifier": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen#article"
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "DeLaParra Services",
                    "url": "https://delaparra-services.nl/"
                },
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/manuals#dataset",
                    "name": "Manuals for working on your own app",
                    "url": "https://delaparra-services.nl/manuals"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "foutmeldingen-begrijpen.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.csv",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "foutmeldingen-begrijpen.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.json",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "foutmeldingen-begrijpen.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.md",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "foutmeldingen-begrijpen.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.pdf",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "foutmeldingen-begrijpen.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/manuals/foutmeldingen-begrijpen.zip",
                        "inLanguage": "en"
                    }
                ]
            }
        ]
    }
}