Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider accepting raw string as valid exception message #445

Open
saba-mo opened this issue Feb 28, 2025 · 0 comments
Open

Consider accepting raw string as valid exception message #445

saba-mo opened this issue Feb 28, 2025 · 0 comments

Comments

@saba-mo
Copy link
Contributor

saba-mo commented Feb 28, 2025

Hoist Core and Hoist React have some opinions that an exception will be returned over a json API with the following json forms:

// Hoist Core's incoming Exception shape, as parsed by JsonClient.groovy
{
     message?:string,
     className?: string
} 

// Hoist Core's outgoing Exception shape, as output by ThrowableSerializer.groovy
{
     name     : string,
     message  : string,
     isRoutine: boolean,
     cause?: string
}
// Hoist React's incoming exception shape, as parsed by ExceptionHandler.ts
{
     name: string, 
     message?: string
     isRoutine?: boolean
     ... 
} 

Is this too opinionated? Should we just accept a raw string in all cases as a valid exception message? This has come up recently in client apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant