{"id":15603960,"url":"https://github.com/cusspvz/intl-error","last_synced_at":"2025-04-12T15:20:47.886Z","repository":{"id":57275462,"uuid":"85186125","full_name":"cusspvz/intl-error","owner":"cusspvz","description":"react-intl/intl compatible error","archived":false,"fork":false,"pushed_at":"2017-03-16T20:08:14.000Z","size":29,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T09:51:10.973Z","etag":null,"topics":["error","error-handling","errors","intl","react","react-intl","react-native"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cusspvz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-16T11:00:58.000Z","updated_at":"2019-05-30T03:29:40.000Z","dependencies_parsed_at":"2022-09-15T19:10:28.529Z","dependency_job_id":null,"html_url":"https://github.com/cusspvz/intl-error","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cusspvz%2Fintl-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cusspvz%2Fintl-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cusspvz%2Fintl-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cusspvz%2Fintl-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cusspvz","download_url":"https://codeload.github.com/cusspvz/intl-error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586217,"owners_count":21128998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["error","error-handling","errors","intl","react","react-intl","react-native"],"created_at":"2024-10-03T03:22:20.141Z","updated_at":"2025-04-12T15:20:47.861Z","avatar_url":"https://github.com/cusspvz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# intl-error\nreact-intl/intl compatible error\n\nHandle better your errors, add intl compatible errors to your webapp actions.\n\n## Installation\n```bash\nyarn add intl-error\n```\n\n## Usage\n```javascript\nimport React, { Component } from 'react'\nimport IntlError from 'intl-error'\nimport { injectIntl } from 'react-intl'\n\nfunction doSomething () {\n  throw new IntlError({ id: 'testing' })\n}\n\n@injectIntl\nexport default class TestComponent extends Component {\n  state = { error: undefined }\n\n  render () {\n    const { state: { error }, props: { intl }, onClick } = this\n    return (\n      \u003cdiv onClick={onClick}\u003e\n        {error \u0026\u0026 error.formatMessage(intl)}\n       \u003c/div\u003e\n    )\n  }\n\n  onClick = async () =\u003e {\n    try {\n      doSomething()\n    } catch (error) {\n      await this.setState({ error })\n    }\n  }\n}\n \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcusspvz%2Fintl-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcusspvz%2Fintl-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcusspvz%2Fintl-error/lists"}