Coder Social home page Coder Social logo

Comments (1)

LucienHH avatar LucienHH commented on June 21, 2024 1

Hi Kashalls, this is something I've looked at also. Here's what I've put down on a fork I use for a different project, it would benefit from more detailed descriptions but the matchups are there. Could also add more errors to this as I believe this is only a few.

checkTokenError (errorCode) {
  let err = ''
  switch (errorCode) {
    case 2148916227: err = 'ENFORCEMENT_BAN'; break
    case 2148916229: err = 'ACCOUNT_PARENTALLY_RESTRICTED'; break
    case 2148916233: err = 'The user does not currently have an Xbox profile - https://signup.live.com/signup - ACCOUNT_CREATION_REQUIRED'; break
    case 2148916234: err = 'ACCOUNT_TERMS_OF_USE_NOT_ACCEPTED'; break
    case 2148916235: err = 'ACCOUNT_COUNTRY_NOT_AUTHORIZED'; break
    case 2148916236: err = 'ACCOUNT_AGE_VERIFICATION_REQUIRED'; break
    case 2148916237: err = 'ACCOUNT_UNDER_CURFEW'; break
    case 2148916238: err = 'The account date of birth is under 18 years and cannot proceed unless the account is added to a Family by an adult - ACCOUNT_CHILD_NOT_IN_FAMILY'; break // User is under 18
    case 2148916239: err = 'ACCOUNT_CSV_TRANSITION_REQUIRED'; break
    case 2148916240: err = 'ACCOUNT_MAINTENANCE_REQUIRED'; break
    case 2148916243: err = 'ACCOUNT_NAME_CHANGE_REQUIRED'; break
    case 2148916242: err = 'CONTENT_ISOLATION (Verify SCID / Sandbox)'; break
    case 2148916255: err = 'EXPIRED_SERVICE_TOKEN'; break
    case 2148916258: err = 'EXPIRED_USER_TOKEN'; break
    case 2148916257: err = 'EXPIRED_TITLE_TOKEN'; break
    case 2148916256: err = 'EXPIRED_DEVICE_TOKEN'; break
    case 2148916259: err = 'INVALID_DEVICE_TOKEN'; break
    case 2148916260: err = 'INVALID_TITLE_TOKEN'; break
    case 2148916261: err = 'INVALID_USER_TOKEN'; break
    default: {
      err = `Unknown error code (${errorCode})`
    }
  }
  throw new URIError(`Failed to obtain XSTS token: ${err}`)
}

from prismarine-auth.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.