{"id":18572731,"url":"https://github.com/truecodersio/javascript_error_handling","last_synced_at":"2026-01-22T06:38:26.988Z","repository":{"id":60551065,"uuid":"327961213","full_name":"truecodersio/JavaScript_Error_Handling","owner":"truecodersio","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-26T18:11:28.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":118,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T14:31:51.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/truecodersio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-08T16:53:29.000Z","updated_at":"2024-08-29T02:53:34.000Z","dependencies_parsed_at":"2022-10-01T07:30:18.516Z","dependency_job_id":null,"html_url":"https://github.com/truecodersio/JavaScript_Error_Handling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"benrbryant/Exercise_Template","purl":"pkg:github/truecodersio/JavaScript_Error_Handling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2FJavaScript_Error_Handling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2FJavaScript_Error_Handling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2FJavaScript_Error_Handling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2FJavaScript_Error_Handling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truecodersio","download_url":"https://codeload.github.com/truecodersio/JavaScript_Error_Handling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truecodersio%2FJavaScript_Error_Handling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28657055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T23:07:04.801Z","updated_at":"2026-01-22T06:38:26.971Z","avatar_url":"https://github.com/truecodersio.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Error Handling\n\n## Objective\n\nIn this exercise, we will be practicing error handling in JavaScript by implementing **selective catching**, **strict mode** and `try/catch/finally` blocks.\n\n## Steps\n\n### Getting Started\n\nExercise Repo: [JS Error Handling](https://github.com/Bryantellius/JavaScript_Error_Handling)\n\n1. Open your command line and navigate to your repos directory (if you do not have a repos folder, then you can use mkdir repos to create one)\n2. Use this template repository to start a new project in your repos folder: `git clone \u003crepo_link\u003e`\n3. cd repo_name to navigate into your new repo directory\n4. Start Visual Studio Code and select 'Open Folder'. Then select repo_name to open the folder in the editor (or just type code . in your terminal inside the repo directory)\n5. Follow the instructions on the README.md file to complete exercises\n6. Open the app.js file to get started\n\n### Exercise 1: Enable Strict Mode\n\nComplete the following in your `app.js` file\n\n1. Enable JavaScript's \"Strict Mode\" for the _file_\n\n### Exercise 2: Function Syntax Debugging\n\nComplete the following in your `app.js` file\n\n1. There is a problem with the function syntax. Fix the issue before you finish.\n\n\u003e HINT: The issue will cause `data` to be read as `null`.\n\n### Exercise 3: Using Try/Catch\n\nComplete the following in your `app.js` file\n\n1. Add a try/catch block in the function body\n2. Try to return the data parsed to JSON\n3. Catch any raised exceptions\n4. If an exception is caught:\n   1. Print the error to the console\n   2. Return null\n\n### On Complete\n\nWhen you are finished, your console should resemble the following:\n\n```txt\nnull\n{ success: true }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fjavascript_error_handling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruecodersio%2Fjavascript_error_handling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruecodersio%2Fjavascript_error_handling/lists"}