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

Handle 404 properly #1179

Merged
merged 9 commits into from Aug 2, 2016

Conversation

Projects
None yet
3 participants
@Calvinp
Contributor

Calvinp commented Jul 29, 2016

Handles 404s on pages for specific requests, deploys, and tasks by showing the 404 page rather than rendering something meaningless and showing an error.

The following pages are affected:

  • DeployDetail
  • RequestDetail
  • TaskDetail
  • New Deploy Form
  • Edit Request Form

Please let me know if I've missed any @tpetr @kwm4385 @wolfd

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp Jul 29, 2016

Contributor

Looks like it's not going to be possible to detect 404 on Task Search right now.
The server responds with an empty array rather than a 404, even when using the /request/:requestId/task-search URL.
@ssalinas a possible future improvement to the Task Search API would be to 404 when the request isn't found in this case.

@tpetr @kwm4385 @wolfd This PR is good to be reviewed/merged from my perspective now.

Contributor

Calvinp commented Jul 29, 2016

Looks like it's not going to be possible to detect 404 on Task Search right now.
The server responds with an empty array rather than a 404, even when using the /request/:requestId/task-search URL.
@ssalinas a possible future improvement to the Task Search API would be to 404 when the request isn't found in this case.

@tpetr @kwm4385 @wolfd This PR is good to be reviewed/merged from my perspective now.

@Calvinp Calvinp changed the title from Handle 404 properly (WIP) to Handle 404 properly Jul 29, 2016

@@ -346,6 +342,7 @@ function mapStateToProps(state) {
return {
notFound: state.api.deploy.statusCode === 404,
pathname: ownProps.location.pathname,

This comment has been minimized.

@wolfd

wolfd Aug 1, 2016

Contributor

hm, not sure how I feel about this. Even though the web api doesn't capitalize pathname, it also doesn't capitalize onClick, etc. Maybe we should use pathName? @tpetr

@wolfd

wolfd Aug 1, 2016

Contributor

hm, not sure how I feel about this. Even though the web api doesn't capitalize pathname, it also doesn't capitalize onClick, etc. Maybe we should use pathName? @tpetr

This comment has been minimized.

@Calvinp

Calvinp Aug 1, 2016

Contributor

I was following the wording/capitalization of react-router here.

EDIT - Oh, that's what you're saying. I personally think it makes sense to keep it consistent, but I'm fine with changing it if I'm outvoted.

@Calvinp

Calvinp Aug 1, 2016

Contributor

I was following the wording/capitalization of react-router here.

EDIT - Oh, that's what you're saying. I personally think it makes sense to keep it consistent, but I'm fine with changing it if I'm outvoted.

@wolfd

This comment has been minimized.

Show comment
Hide comment
@wolfd

wolfd Aug 2, 2016

Contributor

LGTM

Contributor

wolfd commented Aug 2, 2016

LGTM

@tpetr

This comment has been minimized.

Show comment
Hide comment
@tpetr

tpetr Aug 2, 2016

Member

LGTM

Member

tpetr commented Aug 2, 2016

LGTM

@Calvinp Calvinp merged commit 373ac53 into decaf Aug 2, 2016

1 of 2 checks passed

continuous-integration/travis-ci/push The Travis CI build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Calvinp Calvinp deleted the handle_404_properly branch Aug 2, 2016

@tpetr tpetr modified the milestone: 0.10.0 Aug 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment