
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@altizure/errorcode
Advanced tools
yarn add @altizure/errorcode
import { App, withData } from '../src'
import { Card, Flex, Pre, Text } from 'rebass'
import React, { Component } from 'react'
// @ald/altizure.errorcode is our private package and is a superset of the public
// package, @altizure/errorcode
import { ALL } from '@ald/altizure.errorcode'
import DocsHeader from '../docs/docs-header'
import PropTypes from 'prop-types'
import { contentWidth } from '../src/lib/theme'
import withi18nSSR from '../src/lib/with-i18n-ssr'
// using this private package allow us to use sub file which helps reducing webpack size
const CAMINFO_EN = require('@ald/altizure.errorcode/i18n/en/caminfo-en.json')
// mock data for demo
// this object is returned by API
const mockData = {
error: true,
errorCode: [
"ERROR_TEXTURE_CROSSTILE",
'ERROR_CAMINFO_CAMINTRINSICFILE_EMPTY_FILE',
'ERROR_UNKNOWN'
],
errorArgs: [
{
code: 'ERROR_CAMINFO_CAMINTRINSICFILE_EMPTY_FILE',
description: ["DJI_0001.JPG;DJI_0002.JPG"],
solution: null
},
{
code: 'ERROR_UNKNOWN',
description: ["buffer overflow"],
solution: ["contact support@altizure.com", "try restarting computer"]
}
]
}
@withi18nSSR()
class Report extends Component {
static propTypes = {
i18n: PropTypes.object
}
render () {
const lang = langMap[this.props.i18n.lang]
return mockData.error ? (
mockData.errorCode.map((code, idx) => {
const v2 = true
if (v2) {
// v2 usage, support dynamic info
// backward compatible
const {
description: desc,
solution: sol
} = mockData.errorArgs && mockData.errorArgs.find(e => e.code === code) || {}
const error = ALL.init({ lang, code, desc, sol })
return (
<div>
<h1>{error.getCode()}</h1>
<h2>{error.getDesc()}</h2>
<h2>{error.getSol()}</h2>
</div>
)
} else {
// v1 usage, support only static error code
return (
<div>
<h1>{ALL[lang][code].ErrorNumber}</h1>
<h2>{ALL[lang][code].Description}</h2>
<h2>{ALL[lang][code].Solution}</h2>
</div>
)
}
) : (
<div>
<p>Project is All Good!</p>
</div>
)
}
}
const en = require('@altizure/errorcode').en
app.get('/', (req, res) => {
return res.end(en.ERROR_CAMINFO_EXIF_INVALID_IMAGESIZE.Description)
})
FAQs
i18n of error code
The npm package @altizure/errorcode receives a total of 51 weekly downloads. As such, @altizure/errorcode popularity was classified as not popular.
We found that @altizure/errorcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.