{"id":15462822,"url":"https://github.com/jfrazx/status-codes","last_synced_at":"2026-03-01T06:11:15.772Z","repository":{"id":33151257,"uuid":"143591455","full_name":"jfrazx/status-codes","owner":"jfrazx","description":"Collection of status code enums","archived":false,"fork":false,"pushed_at":"2025-04-05T06:19:22.000Z","size":1761,"stargazers_count":6,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T09:05:20.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfrazx.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-05T07:10:52.000Z","updated_at":"2025-04-05T06:18:27.000Z","dependencies_parsed_at":"2024-12-26T11:03:04.655Z","dependency_job_id":"4b9cb03f-468d-497d-96bc-c2da4deff7ea","html_url":"https://github.com/jfrazx/status-codes","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":"0.14814814814814814","last_synced_commit":"032c381ec7cee1509f2618b195c0561d9158f60a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrazx%2Fstatus-codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrazx%2Fstatus-codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrazx%2Fstatus-codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrazx%2Fstatus-codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfrazx","download_url":"https://codeload.github.com/jfrazx/status-codes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249259146,"owners_count":21239422,"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":[],"created_at":"2024-10-02T00:05:06.451Z","updated_at":"2026-03-01T06:11:15.755Z","avatar_url":"https://github.com/jfrazx.png","language":"TypeScript","readme":"# Status Codes\n\n[![npm (scoped)](https://img.shields.io/npm/v/@status/codes.svg)](https://www.npmjs.com/package/@status/codes)\n[![NPM](https://img.shields.io/npm/l/@status/codes.svg)](LICENSE)\n\nA collection of status code enums.\n\n## Available Enums\n\n- Apache\n- Auth0\n- Braintree\n- Cloudflare\n- FirebaseAuth\n- FirebaseAdminAuth\n- FirebaseAnalytics\n- FirebaseMessaging\n- FTP\n- Http\n- IIS\n- IRC\n- Mocha\n- MongoDB\n- Mongoose \\*wip\n- Nginx\n- Node\n- Postgres\n- Prisma\n- Twitter\n\n## Install\n\nnpm:  \n`npm install @status/codes`\n\nyarn:  \n`yarn add @status/codes`\n\n## Example Usage\n\n```typescript\nimport { Http } from '@status/codes';\n\nexport class NotFoundError extends Error {\n  readonly code = Http.NotFound;\n}\n```\n\nUse with express:\n\n```javascript\nconst { Http } = require('@status/codes');\n\ncreate(request, response) {\n  return Model.create(request.body)\n    .then(instance =\u003e response.status(Http.Created).json(instance))\n    .catch(error =\u003e response.status(Http.Conflict).json(error))\n}\n```\n\nOr Nestjs:\n\n```typescript\nimport { Injectable, NotFoundException } from '@nestjs/common';\nimport { DatabaseService, Prisma } from '@my-app/database';\nimport { PrismaError } from '@status/codes';\n\n@Injectable()\nexport class UserService {\n  constructor(private readonly db: DatabaseService) {}\n\n  async getUserById(id: string) {\n    try {\n      return await this.db.user.findUniqueOrThrow({\n        where: { id },\n      });\n    } catch (error) {\n      if (error instanceof Prisma.PrismaClientKnownRequestError) {\n        if (error.code === PrismaError.DependentRecordNotFound) {\n          throw new NotFoundException(`User with id ${id} not found`);\n        }\n      }\n\n      throw error;\n    }\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrazx%2Fstatus-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfrazx%2Fstatus-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrazx%2Fstatus-codes/lists"}