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

Fix issue : Admin platform does not handle server side errors #129 #141

Merged
merged 1 commit into from
Jan 2, 2019

Conversation

arnaudoisel
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #129
License MIT
Doc PR

@arnaudoisel arnaudoisel changed the title Fix issue : Admin platform does not handle server side errors #129 WIP : Fix issue : Admin platform does not handle server side errors #129 Dec 27, 2018
@arnaudoisel arnaudoisel changed the title WIP : Fix issue : Admin platform does not handle server side errors #129 Fix issue : Admin platform does not handle server side errors #129 Jan 2, 2019
@arnaudoisel
Copy link
Contributor Author

arnaudoisel commented Jan 2, 2019

'react-admin' moved from Babel transpiler to Typescript transpiler (marmelab/react-admin#2426).
And there is a known issue with instanceof and Error subclasses (microsoft/TypeScript#13965).
So since v2.4.x of 'react-admin', it is not possible anymore to expect an instance of a subclass of Error to be an instanceof this subclass.

FYI: with Babel there used to be a similar problem but there was a plugin to fix this (https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend). Such a plugin does not exist with Typescript transpiler.

@dunglas dunglas merged commit 22c641d into api-platform:master Jan 2, 2019
@dunglas
Copy link
Member

dunglas commented Jan 2, 2019

Great investigation! Thanks for the fix @arnaudoisel

@arnaudoisel arnaudoisel deleted the fix/issue#129 branch January 2, 2019 15:49
@desmax
Copy link

desmax commented Jan 15, 2019

@arnaudoisel unfortunately this did not fix my issue..

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

Successfully merging this pull request may close these issues.

3 participants