pulibrary / figgy

Valkyrie-based digital repository backend.
Other
36 stars 4 forks source link

Order Manager doesn't display graphql error messages #5370

Closed eliotjordan closed 1 year ago

eliotjordan commented 2 years ago

Example graphql response with an error.

data: {input: {,…}}}
data: {input: {,…}}
input: {,…}
errors: ["Member ids can only be used to re-order."]
0: "Member ids can only be used to re-order."
resource: {id: "9f57a91e-08ed-4e0a-9662-0d6670fb848b", thumbnail: {id: "2d9e1835-9003-4b55-9c93-de91b2b08b63",…},…}
id: "9f57a91e-08ed-4e0a-9662-0d6670fb848b"
members: [{id: "2d9e1835-9003-4b55-9c93-de91b2b08b63", label: "front cover",…},…]
[0 … 99]

Here's an example graphql error in honeybadger: Valkyrie::Persistence::StaleObjectError in graphql # execute https://app.honeybadger.io/projects/53391/faults/95511387

eliotjordan commented 2 years ago

Probably an issue with the structure manager as well.

hackartisan commented 2 years ago

Do we know how to replicate this?

sdellis commented 2 years ago

@tpendragon here is the screenshot of the new error message in the Order Manager. Working on a Vue test for this, but I'm currently blocked by an error from Circle CI that it can't compile webpacker.

Screen Shot 2022-10-10 at 2.35.19 PM.png

sdellis commented 2 years ago

We need to test these lines of code.

This type of test where we test the commit and check the state for an update, could potentially work.

We could also potentially test the Vuex Action itself. Or we could do a feature test on the Order Manager.

Most of these require knowing how to break the test resource so that it throws an error when saving, which I'm not sure how to do.