Giter Site home page Giter Site logo

Define built-in error code range about docs HOT 7 CLOSED

mtrezza avatar mtrezza commented on June 2, 2024
Define built-in error code range

from docs.

Comments (7)

SebC99 avatar SebC99 commented on June 2, 2024

I agree, having the 141 error for each cloudFunction error is hard to deal with. We have to test for 141, then go inside the error, to find another code, which is not very convenient...

from docs.

stale avatar stale commented on June 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from docs.

mtrezza avatar mtrezza commented on June 2, 2024

OK, then I guess we only have to add a range to the docs.

I noticed that 3rd party modules may want to use custom error codes too. So should we define a suggested range for these as well?

  • Parse Server and Parse Platform modules: ... - 4999
  • 3rd party modules: 5000 - 8999
  • Developers: 9000 - ...

from docs.

SebC99 avatar SebC99 commented on June 2, 2024

Well, the only change to do in the docs in my opinion is to add something about the usage of new Parse.Error(code, message) which let developer uses any code they want.

from docs.

mtrezza avatar mtrezza commented on June 2, 2024

@parse-community/server any thoughts on this?

The current suggestion is to define the following error code ranges:

  • Parse Server and related modules: <= 4999 (incl. neg. numbers)
  • 3rd party modules (not managed by Parse Platform, self-managed by community on first come first served basis): 5000 - 8999
  • Developers (custom app errors): >=9000 <=9999

from docs.

mtrezza avatar mtrezza commented on June 2, 2024

After some more thought, I don't believe that the "3rd party modules" range is feasible because it would have to be community managed, for which I don't see a concept. So I would say that for now we'll just specify that developers have a reserved error range >=9000 <=9999 which they can use for custom errors. Neither Parse Server now any Parse Server adapter or module should use that range, and an 3rd party module should not use the range to prevent conflicts.

from docs.

mtrezza avatar mtrezza commented on June 2, 2024

Closing via #941

from docs.

Related Issues (20)

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.