Closed wimleers closed 6 years ago
@wimleers This is a great DX improvement. There's an issue with JSON API currently nullifying these error messages, #2852691. However if you don't have JSON API enabled the messages come back already. 😄
waterwheel.populateResources('/water-wheel/swagger/entities?_format=json')
.then(() => waterwheel.getAvailableResources())
.then(() => waterwheel.api['node:article'].get(251))
.then(console.log)
.catch(err => {
/*
{
message: 'The used authentication method is not allowed on this route.',
status: 403
}
*/
});
https://www.drupal.org/node/2852691 was fixed a few weeks ago :)
@wimleers Great. I can test this again. I suspect that it will behave correctly already :)
Alright. This should have been closed a while ago. Waterwheel will automatically capture the error message from Drupal and forward on the result.
Title says it all :)
See https://www.drupal.org/node/2808233.
Definitely works for
rest
in Drupal 8.3 core. Should also work for thejsonapi
contrib module for sites using Drupal 8.3.